some warning fixes
authorForest Hale <lordhavoc>
Wed, 5 Sep 2007 17:30:15 +0000 (17:30 +0000)
committerForest Hale <lordhavoc>
Wed, 5 Sep 2007 17:30:15 +0000 (17:30 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@175 8a3a26a2-13c4-0310-b231-cf6edde360e5

tools/quake3/q3map2/brush.c
tools/quake3/q3map2/facebsp.c
tools/quake3/q3map2/mesh.c
tools/quake3/q3map2/path_init.c
tools/quake3/q3map2/surface.c
tools/quake3/q3map2/writebsp.c

index 57b5d81..aa60b8f 100644 (file)
@@ -78,7 +78,7 @@ int   CountBrushList( brush_t *brushes )
        
        
        /* count brushes */
-       for( brushes; brushes != NULL; brushes = brushes->next )
+       for( ; brushes != NULL; brushes = brushes->next )
                c++;
        return c;
 }
@@ -122,7 +122,7 @@ void FreeBrush( brush_t *b )
        
        
        /* error check */
-       if( *((int*) b) == 0xFEFEFEFE )
+       if( *((unsigned int*) b) == 0xFEFEFEFE )
        {
                Sys_FPrintf( SYS_VRB, "WARNING: Attempt to free an already freed brush!\n" );
                return;
@@ -135,7 +135,7 @@ void FreeBrush( brush_t *b )
        
        /* ydnar: overwrite it */
        memset( b, 0xFE, (int) &(((brush_t*) 0)->sides[ b->numsides ]) );
-       *((int*) b) = 0xFEFEFEFE;
+       *((unsigned int*) b) = 0xFEFEFEFE;
        
        /* free it */
        free( b );
@@ -156,7 +156,7 @@ void FreeBrushList( brush_t *brushes )
        
        
        /* walk brush list */
-       for( brushes; brushes != NULL; brushes = next )
+       for( ; brushes != NULL; brushes = next )
        {
                next = brushes->next;
                FreeBrush( brushes );
index 92ad393..8d15e9b 100644 (file)
@@ -180,7 +180,7 @@ int CountFaceList( face_t *list )
        
 
        c = 0;
-       for( list; list != NULL; list = list->next )
+       for( ; list != NULL; list = list->next )
                c++;
        return c;
 }
index 0b8b0ec..c7a8488 100644 (file)
@@ -563,7 +563,7 @@ mesh_t *SubdivideMesh2( mesh_t in, int iterations )
        }
        
        /* keep chopping */
-       for( iterations; iterations > 0; iterations-- )
+       for( ; iterations > 0; iterations-- )
        {
                /* horizontal subdivisions */
                for( j = 0; j + 2 < out.width; j += 4 )
index f35aa41..cb1e736 100644 (file)
@@ -383,7 +383,7 @@ void InitPaths( int *argc, char **argv )
        /* remove processed arguments */
        for( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ )
        {
-               for( j; j < *argc && argv[ j ] == NULL; j++ );
+               for( ; j < *argc && argv[ j ] == NULL; j++ );
                argv[ i ] = argv[ j ];
                if( argv[ i ] != NULL )
                        k++;
index e8a089e..79469a8 100644 (file)
@@ -304,7 +304,7 @@ void TidyEntitySurfaces( entity_t *e )
                out = &mapDrawSurfs[ i ];
                
                /* walk the surface list again until a proper surface is found */
-               for( j; j < numMapDrawSurfs; j++ )
+               for( ; j < numMapDrawSurfs; j++ )
                {
                        /* get in surface */
                        in = &mapDrawSurfs[ j ];
@@ -484,7 +484,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds )
        
        
        /* walk the list of surfaces */
-       for( numSurfs; numSurfs > 0; numSurfs--, ds++ )
+       for( ; numSurfs > 0; numSurfs--, ds++ )
        {
                /* ignore bogus (or flare) surfaces */
                if( ds->type == SURFACE_BAD || ds->numVerts <= 0 )
index fdeca2c..7228189 100644 (file)
@@ -136,7 +136,6 @@ void EmitLeaf( node_t *node )
        bspLeaf_t               *leaf_p;
        brush_t                 *b;
        drawSurfRef_t   *dsr;
-       int                             i = 0;
 
        
        /* check limits */