Index: source/app/unohelp.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/app/unohelp.cxx,v
retrieving revision 1.31
retrieving revision 1.31.140.1
diff -u -r1.31 -r1.31.140.1
--- source/app/unohelp.cxx	8 Mar 2006 13:54:35 -0000	1.31
+++ source/app/unohelp.cxx	30 Jun 2006 12:18:44 -0000	1.31.140.1
@@ -248,7 +248,7 @@
     if ( xExtToolkit.is() )
     {
         // Only for focus events
-        sal_Int16 nType;
+        sal_Int16 nType = ::com::sun::star::accessibility::AccessibleStateType::INVALID;
         rEventObject.NewValue >>= nType;
         if ( nType == ::com::sun::star::accessibility::AccessibleStateType::FOCUSED )
             xExtToolkit->fireFocusGained( rEventObject.Source );
Index: source/control/combobox.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/control/combobox.cxx,v
retrieving revision 1.39
retrieving revision 1.39.20.1
diff -u -r1.39 -r1.39.20.1
--- source/control/combobox.cxx	19 Jun 2006 19:15:38 -0000	1.39
+++ source/control/combobox.cxx	30 Jun 2006 12:18:44 -0000	1.39.20.1
@@ -368,7 +368,7 @@
 		else if ( eAction == AUTOCOMPLETE_TABBACKWARD )
 		{
 			bForward = FALSE;
-			nStart = nStart ? (nStart--) : mpImplLB->GetEntryList()->GetEntryCount()-1;
+			nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1;
 		}
         BOOL bLazy = mbMatchCase ? FALSE : TRUE;
 		// 1. Try match full from current position
Index: source/gdi/pngread.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/gdi/pngread.cxx,v
retrieving revision 1.14
retrieving revision 1.14.18.1
diff -u -r1.14 -r1.14.18.1
--- source/gdi/pngread.cxx	19 Jun 2006 19:30:19 -0000	1.14
+++ source/gdi/pngread.cxx	30 Jun 2006 12:18:44 -0000	1.14.18.1
@@ -990,8 +990,8 @@
 				p1 = pTmp + nBBP;
 				p2 = pTmp;
 		
-				while ( p1 < pTmp + mnScansize - 1 )
-					( *p1++ ) = sal::static_int_cast<BYTE>(*p1 + ( *p2++ ));
+				for (; p1 < pTmp + mnScansize - 1; ++p1)
+					*p1 = sal::static_int_cast<BYTE>(*p1 + ( *p2++ ));
 			}
 			break;
 
@@ -1000,8 +1000,8 @@
 				p1 = pTmp;
 				p2 = mpScanprior+1;
 
-				while ( p1 < pTmp + mnScansize - 1 )
-					( *p1++ ) = sal::static_int_cast<BYTE>(*p1 + ( *p2++ ));
+				for (; p1 < pTmp + mnScansize - 1; ++p1)
+					*p1 = sal::static_int_cast<BYTE>(*p1 + ( *p2++ ));
 			}
 			break;
 
@@ -1011,12 +1011,12 @@
 				p2 = mpScanprior + 1;
 				p3 = pTmp-nBBP;
 
-				while ( p1 < pTmp + mnScansize - 1 )
+				for (; p1 < pTmp + mnScansize - 1; ++p1)
 				{
 					n1 = (BYTE)( *p2++ );
 					n2 = ( p3 >= pTmp ) ? (BYTE)*p3 : 0;
 					p3++;
-					( *p1++ ) = sal::static_int_cast<BYTE>(*p1 + (BYTE)( ( n1 + n2 ) >> 1 ));
+					*p1 = sal::static_int_cast<BYTE>(*p1 + (BYTE)( ( n1 + n2 ) >> 1 ));
 				}
 			}
 			break;
@@ -1028,7 +1028,7 @@
 				p3 = mpScanprior + 1;
 				p4 = p3 - nBBP;
 
-				while ( p1 < pTmp + mnScansize - 1 )
+				for (; p1 < pTmp + mnScansize - 1; ++p1)
 				{
 					nb = *p3++;
 					if ( p2 >= pTmp )
@@ -1053,11 +1053,11 @@
 						npc =-npc;
 
 					if ( ( npa <= npb ) && ( npa <= npc ) ) 
-						*p1++ = sal::static_int_cast<BYTE>(*p1 + (BYTE)na);
+						*p1 = sal::static_int_cast<BYTE>(*p1 + (BYTE)na);
 					else if ( npb <= npc )
-						*p1++ = sal::static_int_cast<BYTE>(*p1 + (BYTE)nb);
+						*p1 = sal::static_int_cast<BYTE>(*p1 + (BYTE)nb);
 					else
-						*p1++ = sal::static_int_cast<BYTE>(*p1 + (BYTE)nc);
+						*p1 = sal::static_int_cast<BYTE>(*p1 + (BYTE)nc);
 
 					p2++;
 					p4++;
Index: source/glyphs/glyphcache.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/glyphs/glyphcache.cxx,v
retrieving revision 1.36
retrieving revision 1.36.20.1
diff -u -r1.36 -r1.36.20.1
--- source/glyphs/glyphcache.cxx	19 Jun 2006 19:33:14 -0000	1.36
+++ source/glyphs/glyphcache.cxx	30 Jun 2006 12:18:45 -0000	1.36.20.1
@@ -519,7 +519,7 @@
 
     // fill in unicode kern pairs with the kern value scaled to the font width
     ImplKernPairData* pKernData = *ppKernPairs;
-    UnicodeKernPairs::const_iterator it =  it = maUnicodeKernPairs.begin();
+    UnicodeKernPairs::const_iterator it = maUnicodeKernPairs.begin();
     for(; it != maUnicodeKernPairs.end(); ++it )
         *(pKernData++) = *it;
 
Index: source/window/tabdlg.cxx
===================================================================
RCS file: /cvs/gsl/vcl/source/window/tabdlg.cxx,v
retrieving revision 1.5
retrieving revision 1.5.20.1
diff -u -r1.5 -r1.5.20.1
--- source/window/tabdlg.cxx	19 Jun 2006 19:41:09 -0000	1.5
+++ source/window/tabdlg.cxx	30 Jun 2006 12:18:45 -0000	1.5.20.1
@@ -177,12 +177,12 @@
 		if ( nCtrlBarWidth <= (aTabSize.Width()+nBtnEx) )
 			nX = (aTabSize.Width()+nBtnEx) - nCtrlBarWidth + IMPL_DIALOG_OFFSET;
 
-		pChild = pChild = GetWindow( WINDOW_FIRSTCHILD );
-		while ( pChild )
+		Window* pChild2 = GetWindow( WINDOW_FIRSTCHILD );
+		while ( pChild2 )
 		{
-			if ( pChild->IsVisible() && (pChild != mpViewWindow) )
+			if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) )
 			{
-				if ( pChild == pTabControl )
+				if ( pChild2 == pTabControl )
 					bTabCtrl = TRUE;
 				else if ( bTabCtrl )
 				{
@@ -196,18 +196,18 @@
 						nLines++;
 					}
 
-					pChild->SetPosSizePixel( Point( nX, nY ), aCtrlSize );
+					pChild2->SetPosSizePixel( Point( nX, nY ), aCtrlSize );
 					nX += aCtrlSize.Width()+IMPL_DIALOG_OFFSET;
 				}
 				else
 				{
-					Size aChildSize = pChild->GetSizePixel();
-					pChild->SetPosPixel( Point( nTopX, (nOffY-aChildSize.Height())/2 ) );
+					Size aChildSize = pChild2->GetSizePixel();
+					pChild2->SetPosPixel( Point( nTopX, (nOffY-aChildSize.Height())/2 ) );
 					nTopX += aChildSize.Width()+2;
 				}
 			}
 
-			pChild = pChild->GetWindow( WINDOW_NEXT );
+			pChild2 = pChild2->GetWindow( WINDOW_NEXT );
 		}
 
 		aDlgSize.Height() += nLines * (aCtrlSize.Height()+IMPL_DIALOG_OFFSET);
Index: unx/inc/Xproto.h
===================================================================
RCS file: unx/inc/Xproto.h
diff -N unx/inc/Xproto.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ unx/inc/Xproto.h	30 Jun 2006 12:18:46 -0000	1.1.2.1
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
+ *  $RCSfile$
+ *
+ *  $Revision$
+ *
+ *  last change: $Author$ $Date$
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2006 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_VCL_UNX_INC_XPROTO_H
+#define INCLUDED_VCL_UNX_INC_XPROTO_H
+
+#ifndef _SAL_CONFIG_H_
+#include "sal/config.h"
+#endif
+
+#include "prex.h"
+
+#if defined __GNUC__
+#pragma GCC system_header
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#endif
+
+#include <X11/Xproto.h>
+
+#if defined __SUNPRO_CC
+#pragma enable_warn
+#endif
+
+#include "postx.h"
+
+#endif
Index: unx/source/app/keysymnames.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/app/keysymnames.cxx,v
retrieving revision 1.15
retrieving revision 1.15.20.1
diff -u -r1.15 -r1.15.20.1
--- unx/source/app/keysymnames.cxx	19 Jun 2006 19:50:05 -0000	1.15
+++ unx/source/app/keysymnames.cxx	30 Jun 2006 12:18:46 -0000	1.15.20.1
@@ -599,7 +599,7 @@
 			// we are disabling it for the moment until better XDarwin support exists.
 			if ( 0 )
 		#else
-			if( pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd ) )
+			if( (pXkbDesc = XkbGetKeyboard( GetDisplay(), XkbAllComponentsMask, XkbUseCoreKbd )) )
 		#endif
 			{
                 const char* pAtom = NULL;
Index: unx/source/app/saldata.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/app/saldata.cxx,v
retrieving revision 1.43
retrieving revision 1.43.18.1
diff -u -r1.43 -r1.43.18.1
--- unx/source/app/saldata.cxx	19 Jun 2006 19:51:21 -0000	1.43
+++ unx/source/app/saldata.cxx	30 Jun 2006 12:18:46 -0000	1.43.18.1
@@ -68,15 +68,7 @@
 #include <vos/mutex.hxx>
 #endif
 
-#include <prex.h>
-#if defined __SUNPRO_CC
-#pragma disable_warn
-#endif
-#include <X11/Xproto.h>
-#if defined __SUNPRO_CC
-#pragma enable_warn
-#endif
-#include <postx.h>
+#include "Xproto.h"
 
 #ifndef _SV_SALDISP_HXX
 #include <saldisp.hxx>
Index: unx/source/app/saldisp.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/app/saldisp.cxx,v
retrieving revision 1.74
retrieving revision 1.74.16.1
diff -u -r1.74 -r1.74.16.1
--- unx/source/app/saldisp.cxx	19 Jun 2006 19:51:34 -0000	1.74
+++ unx/source/app/saldisp.cxx	30 Jun 2006 12:18:46 -0000	1.74.16.1
@@ -2606,7 +2606,7 @@
 
             case ReparentNotify:
                 fprintf( stderr, "\t\tp=%d x=%d y=%d\n",
-                         pEvent->xreparent.parent,
+                         sal::static_int_cast< int >(pEvent->xreparent.parent),
                          pEvent->xreparent.x,
                          pEvent->xreparent.y );
                 break;
@@ -2623,7 +2623,8 @@
             case PropertyNotify:
                 fprintf( stderr, "\t\ta=%s (0x%X)\n",
                          GetAtomName( pDisp_, pEvent->xproperty.atom ),
-                         pEvent->xproperty.atom );
+                         sal::static_int_cast< unsigned int >(
+                             pEvent->xproperty.atom) );
                 break;
 
             case ColormapNotify:
@@ -2636,7 +2637,8 @@
             case ClientMessage:
                 fprintf( stderr, "\t\ta=%s (0x%X) f=%i [0x%lX,0x%lX,0x%lX,0x%lX,0x%lX])\n",
                          GetAtomName( pDisp_, pEvent->xclient.message_type ),
-                         pEvent->xclient.message_type,
+                         sal::static_int_cast< unsigned int >(
+                             pEvent->xclient.message_type),
                          pEvent->xclient.format,
                          pEvent->xclient.data.l[0],
                          pEvent->xclient.data.l[1],
@@ -2705,7 +2707,7 @@
                  ProtocolVersion(pDisp_), ProtocolRevision(pDisp_) );
         fprintf( stderr, "\tScreen (count,def)\t%d (%d,%d)\n",
                  nScreen_, ScreenCount(pDisp_), DefaultScreen(pDisp_) );
-        fprintf( stderr, "\tshift ctrl alt    \t%s (0x%X) %s (0x%X) %s (0x%X)\n",
+        fprintf( stderr, "\tshift ctrl alt    \t%s (0x%lX) %s (0x%lX) %s (0x%lX)\n",
                  KeyStr( nShiftKeySym_ ), nShiftKeySym_,
                  KeyStr( nCtrlKeySym_ ),  nCtrlKeySym_,
                  KeyStr( nMod1KeySym_ ),  nMod1KeySym_ );
@@ -2718,7 +2720,7 @@
             fprintf( stderr, "\tWindowmanager     \t%d\n", eWindowManager_ );
     }
     fprintf( stderr, "Screen\n" );
-    fprintf( stderr, "\tResolution/Size   \t%d*%d %d*%d %.1lf\"\n",
+    fprintf( stderr, "\tResolution/Size   \t%ld*%ld %ld*%ld %.1lf\"\n",
              aResolution_.A(), aResolution_.B(),
              aSize_.Width(), aSize_.Height(),
              Hypothenuse( DisplayWidthMM ( pDisp_, nScreen_ ),
@@ -2730,12 +2732,13 @@
     fprintf( stderr, "\tVisual            \t%d-bit %s ID=0x%x\n",
              pVisual_->GetDepth(),
              VisualClassName[ pVisual_->GetClass() ],
-             pVisual_->GetVisualId() );
+             sal::static_int_cast< unsigned int >(pVisual_->GetVisualId()) );
     if( pVisual_ != pRootVisual_ )
         fprintf( stderr, "\tRoot visual       \t%d-bit %s ID=0x%x\n",
                  pRootVisual_->GetDepth(),
                  VisualClassName[ pRootVisual_->GetClass() ],
-                 pRootVisual_->GetVisualId() );
+                 sal::static_int_cast< unsigned int >(
+                     pRootVisual_->GetVisualId()) );
 }
 
 void SalDisplay::GetScreenFontResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) const
Index: unx/source/gdi/salgdi.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/gdi/salgdi.cxx,v
retrieving revision 1.42
retrieving revision 1.42.18.1
diff -u -r1.42 -r1.42.18.1
--- unx/source/gdi/salgdi.cxx	19 Jun 2006 19:54:22 -0000	1.42
+++ unx/source/gdi/salgdi.cxx	30 Jun 2006 12:18:47 -0000	1.42.18.1
@@ -36,15 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <prex.h>
-#if defined __SUNPRO_CC
-#pragma disable_warn
-#endif
-#include <X11/Xproto.h>
-#if defined __SUNPRO_CC
-#pragma enable_warn
-#endif
-#include <postx.h>
+#include "Xproto.h"
 
 #include <salunx.h>
 
Index: unx/source/gdi/xlfd_attr.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/gdi/xlfd_attr.cxx,v
retrieving revision 1.19
retrieving revision 1.19.20.1
diff -u -r1.19 -r1.19.20.1
--- unx/source/gdi/xlfd_attr.cxx	19 Jun 2006 19:56:05 -0000	1.19
+++ unx/source/gdi/xlfd_attr.cxx	30 Jun 2006 12:18:47 -0000	1.19.20.1
@@ -485,7 +485,7 @@
 		unsigned int nUpper = nNum;
 		unsigned int nCurrent;
   		int nComparison = 1;
-		Attribute *pHaystack, *pNeedle;
+		Attribute *pHaystack = 0, *pNeedle;
 
 		pNeedle = &mpList[ i ];
 
Index: unx/source/window/salframe.cxx
===================================================================
RCS file: /cvs/gsl/vcl/unx/source/window/salframe.cxx,v
retrieving revision 1.205
retrieving revision 1.205.18.1
diff -u -r1.205 -r1.205.18.1
--- unx/source/window/salframe.cxx	19 Jun 2006 19:57:36 -0000	1.205
+++ unx/source/window/salframe.cxx	30 Jun 2006 12:18:47 -0000	1.205.18.1
@@ -3080,7 +3080,7 @@
 
 long X11SalFrame::HandleExposeEvent( XEvent *pEvent )
 {
-	XRectangle	aRect;
+	XRectangle	aRect = { 0, 0, 0, 0 };
 	USHORT		nCount = 0;
 
 	if( pEvent->type == Expose )
