]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
some warning fixes
authorlordhavoc <lordhavoc@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Wed, 5 Sep 2007 17:30:15 +0000 (17:30 +0000)
committerlordhavoc <lordhavoc@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Wed, 5 Sep 2007 17:30:15 +0000 (17:30 +0000)
git-svn-id: https://zerowing.idsoftware.com/svn/radiant/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 57b5d81a81d610e7831b09c51be4842d3a381824..aa60b8fa498f4605826b7c0125a80f71b6e89be5 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 92ad393cddf365bcb2930c631d663a70e5a12906..8d15e9bc9f5f68a5f95c81b7d24b15dc0f3b247b 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 0b8b0ec00845d7681e10ee2b8f610e709a0a63ae..c7a8488b79a7e4a807d705ac052d62465197215b 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 f35aa41245291001fea1d9fa83b8b4e0749a900d..cb1e7362477bda9813345d0f911cda62b1ef26ed 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 e8a089e5c10669e13cdf21ae8c43a6f3b277214e..79469a86a9f0e0a29dff9e3ee2aaa45c793f0c4f 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 fdeca2c2de88d531e7d31be2a663f52b0b8fc7cc..7228189832e63d5a5ea779fcd5d486822724885f 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 */