- gcc 4.4.0 bringup 1 of ?:
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 30 Aug 2009 15:53:16 +0000 (15:53 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 30 Aug 2009 15:53:16 +0000 (15:53 +0000)
- servman: Disable unused, static function
- explorer, mpu401: Fix "deprecated conversion from string constant to 'xxx'" under
- ws2_32_new, portcls: Hack around bogus uninitialized variable usage warning for
- glu32: Fix various warnings and errors

svn path=/trunk/; revision=42970

19 files changed:
reactos/base/applications/mscutils/servman/propsheet_depends.c
reactos/base/shell/explorer/shell/mainframe.cpp
reactos/base/shell/explorer/shell/pane.cpp
reactos/dll/win32/glu32/libnurbs/internals/backend.cc
reactos/dll/win32/glu32/libnurbs/internals/backend.h
reactos/dll/win32/glu32/libnurbs/internals/bin.cc
reactos/dll/win32/glu32/libnurbs/internals/bin.h
reactos/dll/win32/glu32/libnurbs/internals/bufpool.cc
reactos/dll/win32/glu32/libnurbs/internals/bufpool.h
reactos/dll/win32/glu32/libnurbs/internals/intersect.cc
reactos/dll/win32/glu32/libnurbs/internals/knotvector.cc
reactos/dll/win32/glu32/libnurbs/internals/knotvector.h
reactos/dll/win32/glu32/libnurbs/internals/nurbstess.cc
reactos/dll/win32/glu32/libnurbs/internals/nurbstess.h
reactos/dll/win32/glu32/libnurbs/internals/subdivider.cc
reactos/dll/win32/glu32/libnurbs/nurbtess/partitionY.cc
reactos/dll/win32/ws2_32_new/src/select.c
reactos/drivers/wdm/audio/backpln/portcls/unregister.c
reactos/drivers/wdm/audio/drivers/mpu401/adapter.cpp

index 37c870a..e18f10b 100644 (file)
@@ -50,6 +50,7 @@ AddItemToTreeView(HWND hTreeView,
     return TreeView_InsertItem(hTreeView, &tvins);
 }
 
+#if 0
 static VOID
 AddServiceDependency(PSERVICEPROPSHEET dlgInfo,
                      HWND hTreeView,
@@ -123,6 +124,7 @@ AddServiceDependency(PSERVICEPROPSHEET dlgInfo,
     }
 
 }
+#endif
 
 static VOID
 AddServiceDependent(HWND hTreeView,
index a19fcf6..504b61f 100644 (file)
@@ -153,6 +153,11 @@ MainFrameBase::MainFrameBase(HWND hwnd)
  :     super(hwnd)
 {
     HDC hDC = GetDC(NULL);
+#ifndef _NO_REBAR
+    //static WCHAR Title1[] = TEXT("Toolbar");
+    static WCHAR Title2[] = TEXT("Address :");
+#endif
+
     if (hDC)
     {
         DWORD ilMask;
@@ -264,7 +269,7 @@ MainFrameBase::MainFrameBase(HWND hwnd)
        rbBand.cyMaxChild = 0;
        rbBand.cyIntegral = btn_hgt;
 
-       rbBand.lpText = NULL;//TEXT("Toolbar");
+       rbBand.lpText = NULL;//Title1
        rbBand.hwndChild = _htoolbar;
        rbBand.cxMinChild = 0;
        rbBand.cyMinChild = btn_hgt;
@@ -273,7 +278,7 @@ MainFrameBase::MainFrameBase(HWND hwnd)
 
        rbBand.fStyle &= ~RBBS_HIDETITLE;
        rbBand.fStyle |= RBBS_BREAK;
-    rbBand.lpText = TEXT("Address :");
+    rbBand.lpText = Title2;
        rbBand.hwndChild = _haddrcombo;
        rbBand.cxMinChild = 0;
        rbBand.cyMinChild = btn_hgt;
index b79a145..d28f907 100644 (file)
@@ -42,7 +42,7 @@ enum IMAGE {
 #define IMAGE_HEIGHT           13
 
 
-static const LPTSTR g_pos_names[COLUMNS] = {
+static const TCHAR* g_pos_names[COLUMNS] = {
        TEXT(""),                       /* symbol */
        TEXT("Name"),
        TEXT("Type"),
@@ -141,7 +141,7 @@ bool Pane::create_header(HWND hparent, int id)
        hdi.mask = HDI_TEXT|HDI_WIDTH|HDI_FORMAT;
 
        for(int idx=0; idx<COLUMNS; idx++) {
-               hdi.pszText = g_pos_names[idx];
+               hdi.pszText = (TCHAR*)g_pos_names[idx];
                hdi.fmt = HDF_STRING | g_pos_align[idx];
                hdi.cxy = _widths[idx];
                Header_InsertItem(hwnd, idx, &hdi);
index a028088..d120b1a 100644 (file)
@@ -246,7 +246,7 @@ Backend::evalVStrip(int n_left, REAL u_left, REAL* left_val,
  *-------------------------------------------------------------------------
  */
 void
-Backend::bgntmesh( char * )            
+Backend::bgntmesh( const char * )              
 {
 #ifndef NOWIREFRAME
 
index d8af424..6c7f7fc 100644 (file)
@@ -65,7 +65,7 @@ public:
     void               surfbbox( long, REAL *, REAL * );
     void               surfgrid( REAL, REAL, long, REAL, REAL, long );
     void               surfmesh( long, long, long, long );
-    void               bgntmesh( char * );
+    void               bgntmesh( const char * );
     void               endtmesh( void );
     void               swaptmesh( void );
     void               tmeshvert( GridTrimVertex * );
index 42052f5..5bfa992 100644 (file)
@@ -120,7 +120,7 @@ Bin::adopt()
  */
 
 void
-Bin::show( char *name )
+Bin::show( const char *name )
 {
 #ifndef NDEBUG
     dprintf( "%s\n", name );
index 77b59e9..1a2ffab 100644 (file)
@@ -63,7 +63,7 @@ public:
     int                        numarcs( void );
     void               adopt( void );
     void               markall( void );
-    void               show( char * );
+    void               show( const char * );
     void               listBezier( void );
 };
 
index 7689c4a..096ea4f 100644 (file)
@@ -48,7 +48,7 @@
  * Pool - allocate a new pool of buffers
  *-----------------------------------------------------------------------------
  */
-Pool::Pool( int _buffersize, int initpoolsize, char *n )
+Pool::Pool( int _buffersize, int initpoolsize, const char *n )
 {
     buffersize= (_buffersize < (int)sizeof(Buffer)) ? sizeof(Buffer) : _buffersize;
     initsize   = initpoolsize * buffersize;
index ebe5465..137e7e6 100644 (file)
@@ -55,7 +55,7 @@ class Buffer {
 
 class Pool {
 public:
-                       Pool( int, int, char * );
+                       Pool( int, int, const char * );
                        ~Pool( void );
     inline void*       new_buffer( void );
     inline void                free_buffer( void * );
@@ -74,7 +74,7 @@ protected:
     int                        nextfree;               /* byte offset past next free buffer */
     int                        initsize;
     enum Magic { is_allocated = 0xf3a1, is_free = 0xf1a2 };
-    char               *name;                  /* name of the pool */
+    const char *name;                  /* name of the pool */
     Magic              magic;                  /* marker for valid pool */
 };
 
index 66f3f30..204a8b3 100644 (file)
@@ -179,6 +179,13 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir )
     TrimVertex* v = jarc->pwlArc->pts;
 
     int                loc[3];
+
+#if defined(__GNUC__) && \
+       (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ == 40400)
+       /* Silence incorrect GCC 4.4.0 warnings */
+       loc[0] = loc[1] = loc[2] = 0;
+#endif
+
     switch( pwlarc_intersect( jarc->pwlArc, param, value, dir, loc ) ) {
 
                // When the parameter value lands on a vertex, life is sweet
index 50556f6..f90ba81 100644 (file)
@@ -126,7 +126,7 @@ int Knotvector::validate( void )
     return 0;
 }
 
-void Knotvector::show( char *msg )
+void Knotvector::show( const char *msg )
 {
 #ifndef NDEBUG
     dprintf( "%s\n", msg );
index eecefe4..1fc5d57 100644 (file)
@@ -49,7 +49,7 @@ struct Knotvector { /* a knot vector */
                        ~Knotvector( void );
     void               init( long, long, long, INREAL * );
     int                        validate( void );
-    void               show( char * );
+    void               show( const char * );
 
     long               order;          /* order of spline  */
     long               knotcount;      /* number of knots  */
index 41a7812..24f07fa 100644 (file)
@@ -677,7 +677,7 @@ NurbsTessellator::do_nurbserror( int msg )
 }
 
 int 
-NurbsTessellator::do_check_knots( Knotvector *knots, char *msg )
+NurbsTessellator::do_check_knots( Knotvector *knots, const char *msg )
 {
     int status = knots->validate();
     if( status ) {
index d1b250b..4ea4321 100644 (file)
@@ -112,7 +112,7 @@ protected:
 private:
 
     void               resetObjects( void );
-    int                        do_check_knots( Knotvector *, char * );
+    int                        do_check_knots( Knotvector *, const char * );
     void               do_nurbserror( int );
     void               do_bgncurve( O_curve * );
     void               do_endcurve( void );
index cc0b514..a46bf4b 100644 (file)
@@ -531,16 +531,18 @@ Subdivider::nonSamplingSplit(
                     patchlist.pspec[param].range[1] ) * 0.5;
        split( source, left, right, param, mid );
        Patchlist subpatchlist( patchlist, param, mid );
-       if( left.isnonempty() )
+       if( left.isnonempty() ) {
            if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT ) 
                freejarcs( left );
            else
                nonSamplingSplit( left, subpatchlist, subdivisions-1, param );
-       if( right.isnonempty() ) 
+       }
+       if( right.isnonempty() )  {
            if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT ) 
                freejarcs( right );
            else
                nonSamplingSplit( right, patchlist, subdivisions-1, param );
+       }
 
     } else {
        // make bbox calls
index 2bfc362..d38b2fd 100644 (file)
@@ -113,8 +113,8 @@ Int isCusp(directedLine *v)
   else if(A[1] > B[1] && C[1] > B[1])
     return 1;
 
-  if(isAbove(v, v) && isAbove(v, v->getPrev()) ||
-     isBelow(v, v) && isBelow(v, v->getPrev()))
+  if((isAbove(v, v) && isAbove(v, v->getPrev())) ||
+     (isBelow(v, v) && isBelow(v, v->getPrev())))
     return 1;
   else
     return 0;
index 79680b7..501f36e 100644 (file)
@@ -52,6 +52,12 @@ select(IN INT s,
     SOCKET Handle;
     DPRINT("select: %lx %p %p %p %p\n", s, readfds, writefds, exceptfds, timeout);
 
+#if defined(__GNUC__) && \
+    (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ == 40400)
+    /* Silence incorrect GCC 4.4.0 warning */
+    Handle = 0;
+#endif
+
     /* Check for WSAStartup */
     if ((ErrorCode = WsQuickProlog()) == ERROR_SUCCESS)
     {
index 41a7af5..62fb116 100644 (file)
@@ -80,6 +80,12 @@ IUnregisterSubdevice_fnUnregisterSubdevice(
 
     ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
 
+#if defined(__GNUC__) && \
+    (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ == 40400)
+    /* Silence incorrect GCC 4.4.0 warning */
+    SubDeviceEntry = NULL;
+#endif
+
     DeviceExtension = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
     ASSERT(DeviceExtension);
 
index 2f9b25d..a57cd2f 100644 (file)
@@ -18,6 +18,8 @@
 #include <portcls.h>
 #include <debug.h>
 
+WCHAR DeviceName[] = L"Uart";
+
 NTSTATUS
 NTAPI
 StartDevice(
@@ -68,7 +70,7 @@ StartDevice(
     }
 
     DPRINT1("Registering subdevice via PcRegisterSubdevice\n");
-    Status = PcRegisterSubdevice(pDeviceObject, L"Uart", port);
+    Status = PcRegisterSubdevice(pDeviceObject, DeviceName, port);
 
     if (!NT_SUCCESS(Status))
     {