fix some warnings
This commit is contained in:
parent
1805e42582
commit
64f6b4a4ac
|
|
@ -1823,7 +1823,7 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
|
|||
break;
|
||||
} //end if
|
||||
} //end case
|
||||
|
||||
// fall through
|
||||
case P_MUL:
|
||||
case P_DIV:
|
||||
case P_MOD:
|
||||
|
|
|
|||
|
|
@ -414,7 +414,6 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
|
|||
#else
|
||||
glob_t globbuf;
|
||||
struct stat statbuf;
|
||||
int j;
|
||||
#endif
|
||||
quakefile_t *qfiles, *lastqf, *qf;
|
||||
char pakfile[_MAX_PATH], filename[_MAX_PATH], *str;
|
||||
|
|
@ -435,7 +434,7 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
|
|||
_stat(pakfile, &statbuf);
|
||||
#else
|
||||
glob(pakfilter, 0, NULL, &globbuf);
|
||||
for (j = 0; j < globbuf.gl_pathc; j++)
|
||||
for (size_t j = 0; j < globbuf.gl_pathc; j++)
|
||||
{
|
||||
strcpy(pakfile, globbuf.gl_pathv[j]);
|
||||
stat(pakfile, &statbuf);
|
||||
|
|
@ -499,7 +498,7 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
|
|||
strcat(filename, filedata.cFileName);
|
||||
#else
|
||||
glob(filter, 0, NULL, &globbuf);
|
||||
for (j = 0; j < globbuf.gl_pathc; j++)
|
||||
for (size_t j = 0; j < globbuf.gl_pathc; j++)
|
||||
{
|
||||
strcpy(filename, globbuf.gl_pathv[j]);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void SetModelNumbers (void)
|
|||
{
|
||||
int i;
|
||||
int models;
|
||||
char value[10];
|
||||
char value[16];
|
||||
|
||||
models = 1;
|
||||
for (i=1 ; i<num_entities ; i++)
|
||||
|
|
@ -356,7 +356,7 @@ void SetLightStyles (void)
|
|||
char *t;
|
||||
entity_t *e;
|
||||
int i, j;
|
||||
char value[10];
|
||||
char value[16];
|
||||
char lighttargets[MAX_SWITCHED_LIGHTS][64];
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2729,7 +2729,7 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
}
|
||||
s->sub.decode.codes = c;
|
||||
}
|
||||
s->mode = CODES;
|
||||
s->mode = CODES; // fall through
|
||||
case CODES:
|
||||
UPDATE
|
||||
if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
|
||||
|
|
@ -2745,12 +2745,12 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
s->mode = TYPE;
|
||||
break;
|
||||
}
|
||||
s->mode = DRY;
|
||||
s->mode = DRY; // fall through
|
||||
case DRY:
|
||||
FLUSH
|
||||
if (s->read != s->write)
|
||||
LEAVE
|
||||
s->mode = DONE;
|
||||
s->mode = DONE; // fall through
|
||||
case DONE:
|
||||
r = Z_STREAM_END;
|
||||
LEAVE
|
||||
|
|
@ -2976,7 +2976,7 @@ static int huft_build(uInt *b, uInt n, uInt s, const uInt *d, const uInt *e, inf
|
|||
uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */
|
||||
register uInt *p; /* pointer into c[], b[], or v[] */
|
||||
inflate_huft *q; /* points to current table */
|
||||
struct inflate_huft_s r = { {{0, 0}} }; /* table entry for structure assignment */
|
||||
struct inflate_huft_s r = { {{0, 0}}, 0 }; /* table entry for structure assignment */
|
||||
inflate_huft *u[BMAX]; /* table stack */
|
||||
register int w; /* bits before this table == (l * h) */
|
||||
uInt x[BMAX+1]; /* bit offsets, then code stack */
|
||||
|
|
@ -3070,7 +3070,7 @@ static int huft_build(uInt *b, uInt n, uInt s, const uInt *d, const uInt *e, inf
|
|||
|
||||
/* compute minimum size table less than or equal to l bits */
|
||||
z = g - w;
|
||||
z = z > (uInt)l ? l : z; /* table size upper limit */
|
||||
z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */
|
||||
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
|
||||
{ /* too few codes for k-w bit table */
|
||||
f -= a + 1; /* deduct codes from patterns left */
|
||||
|
|
@ -3660,7 +3660,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
#endif /* !SLOW */
|
||||
c->sub.code.need = c->lbits;
|
||||
c->sub.code.tree = c->ltree;
|
||||
c->mode = LEN;
|
||||
c->mode = LEN; // fall through
|
||||
case LEN: /* i: get length/literal/eob next */
|
||||
j = c->sub.code.need;
|
||||
NEEDBITS(j)
|
||||
|
|
@ -3707,7 +3707,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
c->sub.code.need = c->dbits;
|
||||
c->sub.code.tree = c->dtree;
|
||||
Tracevv(("inflate: length %u\n", c->len));
|
||||
c->mode = DIST;
|
||||
c->mode = DIST; // fall through
|
||||
case DIST: /* i: get distance next */
|
||||
j = c->sub.code.need;
|
||||
NEEDBITS(j)
|
||||
|
|
@ -3737,7 +3737,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
c->sub.copy.dist += (uInt)b & inflate_mask[j];
|
||||
DUMPBITS(j)
|
||||
Tracevv(("inflate: distance %u\n", c->sub.copy.dist));
|
||||
c->mode = COPY;
|
||||
c->mode = COPY; // fall through
|
||||
case COPY: /* o: copying bytes in window, waiting for space */
|
||||
#ifndef __TURBOC__ /* Turbo C bug for following expression */
|
||||
f = (uInt)(q - s->window) < c->sub.copy.dist ?
|
||||
|
|
@ -3774,7 +3774,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
FLUSH
|
||||
if (s->read != s->write)
|
||||
LEAVE
|
||||
c->mode = END;
|
||||
c->mode = END; // fall through
|
||||
case END:
|
||||
r = Z_STREAM_END;
|
||||
LEAVE
|
||||
|
|
@ -4042,7 +4042,7 @@ int inflate(z_streamp z, int f)
|
|||
z->state->sub.marker = 5; /* can't try inflateSync */
|
||||
break;
|
||||
}
|
||||
z->state->mode = imFLAG;
|
||||
z->state->mode = imFLAG; // fall through
|
||||
case imFLAG:
|
||||
iNEEDBYTE
|
||||
b = iNEXTBYTE;
|
||||
|
|
@ -4059,19 +4059,19 @@ int inflate(z_streamp z, int f)
|
|||
z->state->mode = imBLOCKS;
|
||||
break;
|
||||
}
|
||||
z->state->mode = imDICT4;
|
||||
z->state->mode = imDICT4; // fall through
|
||||
case imDICT4:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
|
||||
z->state->mode = imDICT3;
|
||||
z->state->mode = imDICT3; // fall through
|
||||
case imDICT3:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
|
||||
z->state->mode = imDICT2;
|
||||
z->state->mode = imDICT2; // fall through
|
||||
case imDICT2:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
|
||||
z->state->mode = imDICT1;
|
||||
z->state->mode = imDICT1; // fall through
|
||||
case imDICT1:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE;
|
||||
|
|
@ -4102,19 +4102,19 @@ int inflate(z_streamp z, int f)
|
|||
z->state->mode = imDONE;
|
||||
break;
|
||||
}
|
||||
z->state->mode = imCHECK4;
|
||||
z->state->mode = imCHECK4; // fall through
|
||||
case imCHECK4:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
|
||||
z->state->mode = imCHECK3;
|
||||
z->state->mode = imCHECK3; // fall through
|
||||
case imCHECK3:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
|
||||
z->state->mode = imCHECK2;
|
||||
z->state->mode = imCHECK2; // fall through
|
||||
case imCHECK2:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
|
||||
z->state->mode = imCHECK1;
|
||||
z->state->mode = imCHECK1; // fall through
|
||||
case imCHECK1:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE;
|
||||
|
|
@ -4127,7 +4127,7 @@ int inflate(z_streamp z, int f)
|
|||
break;
|
||||
}
|
||||
Tracev(("inflate: zlib check ok\n"));
|
||||
z->state->mode = imDONE;
|
||||
z->state->mode = imDONE; // fall through
|
||||
case imDONE:
|
||||
return Z_STREAM_END;
|
||||
case imBAD:
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ int ParseChunk( FILE *input ){
|
|||
w--;
|
||||
bytesread++;
|
||||
} while ( temp[i - 1] );
|
||||
|
||||
// fall through
|
||||
case MAIN3DS:
|
||||
case OBJ_TRIMESH:
|
||||
case EDIT3DS:
|
||||
|
|
|
|||
|
|
@ -323,7 +323,8 @@ void InitPaths( int *argc, char **argv ){
|
|||
/* remove processed arguments */
|
||||
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ )
|
||||
{
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ );
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ ){
|
||||
}
|
||||
argv[ i ] = argv[ j ];
|
||||
if ( argv[ i ] != NULL ) {
|
||||
k++;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@ void ProcessWorldModel( void ){
|
|||
entity_t *e;
|
||||
tree_t *tree;
|
||||
qboolean leaked;
|
||||
qboolean optimize;
|
||||
xmlNodePtr polyline, leaknode;
|
||||
char level[ 2 ];
|
||||
|
||||
|
|
@ -200,7 +199,7 @@ void ProcessWorldModel( void ){
|
|||
block_yh = 3;
|
||||
}
|
||||
|
||||
for ( optimize = false ; optimize <= true ; optimize++ )
|
||||
for ( int optimize = 0; optimize <= 1; optimize++ )
|
||||
{
|
||||
Sys_FPrintf( SYS_VRB, "--------------------------------------------\n" );
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ void WriteBSP( node_t *headnode ){
|
|||
void SetModelNumbers( void ){
|
||||
int i;
|
||||
int models;
|
||||
char value[10];
|
||||
char value[16];
|
||||
|
||||
models = 1;
|
||||
for ( i = 1 ; i < num_entities ; i++ )
|
||||
|
|
@ -349,7 +349,7 @@ void SetLightStyles( void ){
|
|||
char *t;
|
||||
entity_t *e;
|
||||
int i, j;
|
||||
char value[10];
|
||||
char value[16];
|
||||
char lighttargets[MAX_SWITCHED_LIGHTS][64];
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -252,7 +252,6 @@ void PackDirectory_r( char *dir ){
|
|||
int count;
|
||||
struct stat st;
|
||||
int i;
|
||||
int len;
|
||||
char fullname[1024];
|
||||
char dirstring[1024];
|
||||
char *name;
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ int ParseChunk( FILE *input ){
|
|||
w--;
|
||||
bytesread++;
|
||||
} while ( temp[i - 1] );
|
||||
|
||||
// fall through
|
||||
case MAIN3DS:
|
||||
case OBJ_TRIMESH:
|
||||
case EDIT3DS:
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ void LokiInitPaths( char *argv0 ){
|
|||
|
||||
/* verify the path */
|
||||
if ( access( temp, X_OK ) == 0 ) {
|
||||
found++;
|
||||
found = true;
|
||||
}
|
||||
path = last + 1;
|
||||
}
|
||||
|
|
@ -324,7 +324,8 @@ void InitPaths( int *argc, char **argv ){
|
|||
/* remove processed arguments */
|
||||
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ )
|
||||
{
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ );
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ ){
|
||||
}
|
||||
argv[ i ] = argv[ j ];
|
||||
if ( argv[ i ] != NULL ) {
|
||||
k++;
|
||||
|
|
|
|||
|
|
@ -242,7 +242,6 @@ void PackDirectory_r( char *dir ){
|
|||
int count;
|
||||
struct stat st;
|
||||
int i;
|
||||
int len;
|
||||
char fullname[1024];
|
||||
char dirstring[1024];
|
||||
char *name;
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ int ParseChunk( FILE *input ){
|
|||
w--;
|
||||
bytesread++;
|
||||
} while ( temp[i - 1] );
|
||||
|
||||
// fall through
|
||||
case MAIN3DS:
|
||||
case OBJ_TRIMESH:
|
||||
case EDIT3DS:
|
||||
|
|
|
|||
|
|
@ -3071,7 +3071,7 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
}
|
||||
s->sub.decode.codes = c;
|
||||
}
|
||||
s->mode = CODES;
|
||||
s->mode = CODES; // fall through
|
||||
case CODES:
|
||||
UPDATE
|
||||
if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
|
||||
|
|
@ -3087,12 +3087,12 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
s->mode = TYPE;
|
||||
break;
|
||||
}
|
||||
s->mode = DRY;
|
||||
s->mode = DRY; // fall through
|
||||
case DRY:
|
||||
FLUSH
|
||||
if (s->read != s->write)
|
||||
LEAVE
|
||||
s->mode = DONE;
|
||||
s->mode = DONE; // fall through
|
||||
case DONE:
|
||||
r = Z_STREAM_END;
|
||||
LEAVE
|
||||
|
|
@ -4019,7 +4019,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
#endif /* !SLOW */
|
||||
c->sub.code.need = c->lbits;
|
||||
c->sub.code.tree = c->ltree;
|
||||
c->mode = LEN;
|
||||
c->mode = LEN; // fall through
|
||||
case LEN: /* i: get length/literal/eob next */
|
||||
j = c->sub.code.need;
|
||||
NEEDBITS(j)
|
||||
|
|
@ -4066,7 +4066,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
c->sub.code.need = c->dbits;
|
||||
c->sub.code.tree = c->dtree;
|
||||
Tracevv(("inflate: length %u\n", c->len));
|
||||
c->mode = DIST;
|
||||
c->mode = DIST; // fall through
|
||||
case DIST: /* i: get distance next */
|
||||
j = c->sub.code.need;
|
||||
NEEDBITS(j)
|
||||
|
|
@ -4096,7 +4096,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
c->sub.copy.dist += (uInt)b & inflate_mask[j];
|
||||
DUMPBITS(j)
|
||||
Tracevv(("inflate: distance %u\n", c->sub.copy.dist));
|
||||
c->mode = COPY;
|
||||
c->mode = COPY; // fall through
|
||||
case COPY: /* o: copying bytes in window, waiting for space */
|
||||
#ifndef __TURBOC__ /* Turbo C bug for following expression */
|
||||
f = (uInt)(q - s->window) < c->sub.copy.dist ?
|
||||
|
|
@ -4133,7 +4133,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
|
|||
FLUSH
|
||||
if (s->read != s->write)
|
||||
LEAVE
|
||||
c->mode = END;
|
||||
c->mode = END; // fall through
|
||||
case END:
|
||||
r = Z_STREAM_END;
|
||||
LEAVE
|
||||
|
|
@ -4407,7 +4407,7 @@ int inflate(z_streamp z, int f)
|
|||
z->state->sub.marker = 5; /* can't try inflateSync */
|
||||
break;
|
||||
}
|
||||
z->state->mode = imFLAG;
|
||||
z->state->mode = imFLAG; // fall through
|
||||
case imFLAG:
|
||||
iNEEDBYTE
|
||||
b = iNEXTBYTE;
|
||||
|
|
@ -4424,19 +4424,19 @@ int inflate(z_streamp z, int f)
|
|||
z->state->mode = imBLOCKS;
|
||||
break;
|
||||
}
|
||||
z->state->mode = imDICT4;
|
||||
z->state->mode = imDICT4; // fall through
|
||||
case imDICT4:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
|
||||
z->state->mode = imDICT3;
|
||||
z->state->mode = imDICT3; // fall through
|
||||
case imDICT3:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
|
||||
z->state->mode = imDICT2;
|
||||
z->state->mode = imDICT2; // fall through
|
||||
case imDICT2:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
|
||||
z->state->mode = imDICT1;
|
||||
z->state->mode = imDICT1; // fall through
|
||||
case imDICT1:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE;
|
||||
|
|
@ -4467,19 +4467,19 @@ int inflate(z_streamp z, int f)
|
|||
z->state->mode = imDONE;
|
||||
break;
|
||||
}
|
||||
z->state->mode = imCHECK4;
|
||||
z->state->mode = imCHECK4; // fall through
|
||||
case imCHECK4:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
|
||||
z->state->mode = imCHECK3;
|
||||
z->state->mode = imCHECK3; // fall through
|
||||
case imCHECK3:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
|
||||
z->state->mode = imCHECK2;
|
||||
z->state->mode = imCHECK2; // fall through
|
||||
case imCHECK2:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
|
||||
z->state->mode = imCHECK1;
|
||||
z->state->mode = imCHECK1; // fall through
|
||||
case imCHECK1:
|
||||
iNEEDBYTE
|
||||
z->state->sub.check.need += (uLong)iNEXTBYTE;
|
||||
|
|
@ -4492,7 +4492,7 @@ int inflate(z_streamp z, int f)
|
|||
break;
|
||||
}
|
||||
Tracev(("inflate: zlib check ok\n"));
|
||||
z->state->mode = imDONE;
|
||||
z->state->mode = imDONE; // fall through
|
||||
case imDONE:
|
||||
return Z_STREAM_END;
|
||||
case imBAD:
|
||||
|
|
|
|||
|
|
@ -327,7 +327,6 @@ void PackDirectory_r( char *dir ){
|
|||
int count;
|
||||
struct stat st;
|
||||
int i;
|
||||
int len;
|
||||
char fullname[1024];
|
||||
char dirstring[1024];
|
||||
char *name;
|
||||
|
|
|
|||
|
|
@ -484,7 +484,8 @@ void InitPaths( int *argc, char **argv ){
|
|||
/* remove processed arguments */
|
||||
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ )
|
||||
{
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ ) ;
|
||||
for ( ; j < *argc && argv[ j ] == NULL; j++ ){
|
||||
}
|
||||
argv[ i ] = argv[ j ];
|
||||
if ( argv[ i ] != NULL ) {
|
||||
k++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user