From: Forest Hale Date: Wed, 5 Sep 2007 17:30:15 +0000 (+0000) Subject: some warning fixes X-Git-Tag: xonotic-v0.7.0~16^2~12^2~121 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb1e61558a159a08b17949420642cb4b3ad00a07;p=xonotic%2Fnetradiant.git some warning fixes git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@175 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/tools/quake3/q3map2/brush.c b/tools/quake3/q3map2/brush.c index 57b5d81a..aa60b8fa 100644 --- a/tools/quake3/q3map2/brush.c +++ b/tools/quake3/q3map2/brush.c @@ -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 ); diff --git a/tools/quake3/q3map2/facebsp.c b/tools/quake3/q3map2/facebsp.c index 92ad393c..8d15e9bc 100644 --- a/tools/quake3/q3map2/facebsp.c +++ b/tools/quake3/q3map2/facebsp.c @@ -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; } diff --git a/tools/quake3/q3map2/mesh.c b/tools/quake3/q3map2/mesh.c index 0b8b0ec0..c7a8488b 100644 --- a/tools/quake3/q3map2/mesh.c +++ b/tools/quake3/q3map2/mesh.c @@ -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 ) diff --git a/tools/quake3/q3map2/path_init.c b/tools/quake3/q3map2/path_init.c index f35aa412..cb1e7362 100644 --- a/tools/quake3/q3map2/path_init.c +++ b/tools/quake3/q3map2/path_init.c @@ -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++; diff --git a/tools/quake3/q3map2/surface.c b/tools/quake3/q3map2/surface.c index e8a089e5..79469a86 100644 --- a/tools/quake3/q3map2/surface.c +++ b/tools/quake3/q3map2/surface.c @@ -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 ) diff --git a/tools/quake3/q3map2/writebsp.c b/tools/quake3/q3map2/writebsp.c index fdeca2c2..72281898 100644 --- a/tools/quake3/q3map2/writebsp.c +++ b/tools/quake3/q3map2/writebsp.c @@ -136,7 +136,6 @@ void EmitLeaf( node_t *node ) bspLeaf_t *leaf_p; brush_t *b; drawSurfRef_t *dsr; - int i = 0; /* check limits */