mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
some warning fixes
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@175 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
a6f425a3ea
commit
bb1e61558a
6 changed files with 9 additions and 10 deletions
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -136,7 +136,6 @@ void EmitLeaf( node_t *node )
|
|||
bspLeaf_t *leaf_p;
|
||||
brush_t *b;
|
||||
drawSurfRef_t *dsr;
|
||||
int i = 0;
|
||||
|
||||
|
||||
/* check limits */
|
||||
|
|
Loading…
Reference in a new issue