fix some warnings

This commit is contained in:
Garux 2020-02-07 23:00:19 +03:00
parent 1805e42582
commit 64f6b4a4ac
16 changed files with 263 additions and 265 deletions

View File

@ -1823,7 +1823,7 @@ int PC_EvaluateTokens(source_t *source, token_t *tokens, signed long int *intval
break; break;
} //end if } //end if
} //end case } //end case
// fall through
case P_MUL: case P_MUL:
case P_DIV: case P_DIV:
case P_MOD: case P_MOD:

View File

@ -414,7 +414,6 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
#else #else
glob_t globbuf; glob_t globbuf;
struct stat statbuf; struct stat statbuf;
int j;
#endif #endif
quakefile_t *qfiles, *lastqf, *qf; quakefile_t *qfiles, *lastqf, *qf;
char pakfile[_MAX_PATH], filename[_MAX_PATH], *str; char pakfile[_MAX_PATH], filename[_MAX_PATH], *str;
@ -435,7 +434,7 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
_stat(pakfile, &statbuf); _stat(pakfile, &statbuf);
#else #else
glob(pakfilter, 0, NULL, &globbuf); 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]); strcpy(pakfile, globbuf.gl_pathv[j]);
stat(pakfile, &statbuf); stat(pakfile, &statbuf);
@ -499,7 +498,7 @@ quakefile_t *FindQuakeFilesWithPakFilter(char *pakfilter, char *filter)
strcat(filename, filedata.cFileName); strcat(filename, filedata.cFileName);
#else #else
glob(filter, 0, NULL, &globbuf); 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]); strcpy(filename, globbuf.gl_pathv[j]);
#endif #endif

View File

@ -329,7 +329,7 @@ void SetModelNumbers (void)
{ {
int i; int i;
int models; int models;
char value[10]; char value[16];
models = 1; models = 1;
for (i=1 ; i<num_entities ; i++) for (i=1 ; i<num_entities ; i++)
@ -356,7 +356,7 @@ void SetLightStyles (void)
char *t; char *t;
entity_t *e; entity_t *e;
int i, j; int i, j;
char value[10]; char value[16];
char lighttargets[MAX_SWITCHED_LIGHTS][64]; char lighttargets[MAX_SWITCHED_LIGHTS][64];

View File

@ -1369,8 +1369,8 @@ extern int unzClose (unzFile file)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
s=(unz_s*)file; s=(unz_s*)file;
if (s->pfile_in_zip_read!=NULL) if (s->pfile_in_zip_read!=NULL)
unzCloseCurrentFile(file); unzCloseCurrentFile(file);
fclose(s->file); fclose(s->file);
TRYFREE(s); TRYFREE(s);
@ -1694,8 +1694,8 @@ extern int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensiti
if (file==NULL) if (file==NULL)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
s=(unz_s*)file; s=(unz_s*)file;
if (!s->current_file_ok) if (!s->current_file_ok)
@ -1769,9 +1769,9 @@ static int unzlocal_CheckCurrentFileCoherencyHeader (unz_s* s, uInt* piSizeVar,
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED)) (s->cur_file_info.compression_method!=Z_DEFLATED))
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */ if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -1833,8 +1833,8 @@ extern int unzOpenCurrentFile (unzFile file)
if (!s->current_file_ok) if (!s->current_file_ok)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
if (s->pfile_in_zip_read != NULL) if (s->pfile_in_zip_read != NULL)
unzCloseCurrentFile(file); unzCloseCurrentFile(file);
if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
@ -2729,7 +2729,7 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
} }
s->sub.decode.codes = c; s->sub.decode.codes = c;
} }
s->mode = CODES; s->mode = CODES; // fall through
case CODES: case CODES:
UPDATE UPDATE
if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) 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; s->mode = TYPE;
break; break;
} }
s->mode = DRY; s->mode = DRY; // fall through
case DRY: case DRY:
FLUSH FLUSH
if (s->read != s->write) if (s->read != s->write)
LEAVE LEAVE
s->mode = DONE; s->mode = DONE; // fall through
case DONE: case DONE:
r = Z_STREAM_END; r = Z_STREAM_END;
LEAVE 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 */ uInt mask; /* (1 << w) - 1, to avoid cc -O bug on HP */
register uInt *p; /* pointer into c[], b[], or v[] */ register uInt *p; /* pointer into c[], b[], or v[] */
inflate_huft *q; /* points to current table */ 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 */ inflate_huft *u[BMAX]; /* table stack */
register int w; /* bits before this table == (l * h) */ register int w; /* bits before this table == (l * h) */
uInt x[BMAX+1]; /* bit offsets, then code stack */ 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 */ /* compute minimum size table less than or equal to l bits */
z = g - w; 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 */ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
{ /* too few codes for k-w bit table */ { /* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */ 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 */ #endif /* !SLOW */
c->sub.code.need = c->lbits; c->sub.code.need = c->lbits;
c->sub.code.tree = c->ltree; c->sub.code.tree = c->ltree;
c->mode = LEN; c->mode = LEN; // fall through
case LEN: /* i: get length/literal/eob next */ case LEN: /* i: get length/literal/eob next */
j = c->sub.code.need; j = c->sub.code.need;
NEEDBITS(j) 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.need = c->dbits;
c->sub.code.tree = c->dtree; c->sub.code.tree = c->dtree;
Tracevv(("inflate: length %u\n", c->len)); Tracevv(("inflate: length %u\n", c->len));
c->mode = DIST; c->mode = DIST; // fall through
case DIST: /* i: get distance next */ case DIST: /* i: get distance next */
j = c->sub.code.need; j = c->sub.code.need;
NEEDBITS(j) 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]; c->sub.copy.dist += (uInt)b & inflate_mask[j];
DUMPBITS(j) DUMPBITS(j)
Tracevv(("inflate: distance %u\n", c->sub.copy.dist)); 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 */ case COPY: /* o: copying bytes in window, waiting for space */
#ifndef __TURBOC__ /* Turbo C bug for following expression */ #ifndef __TURBOC__ /* Turbo C bug for following expression */
f = (uInt)(q - s->window) < c->sub.copy.dist ? 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 FLUSH
if (s->read != s->write) if (s->read != s->write)
LEAVE LEAVE
c->mode = END; c->mode = END; // fall through
case END: case END:
r = Z_STREAM_END; r = Z_STREAM_END;
LEAVE LEAVE
@ -4042,7 +4042,7 @@ int inflate(z_streamp z, int f)
z->state->sub.marker = 5; /* can't try inflateSync */ z->state->sub.marker = 5; /* can't try inflateSync */
break; break;
} }
z->state->mode = imFLAG; z->state->mode = imFLAG; // fall through
case imFLAG: case imFLAG:
iNEEDBYTE iNEEDBYTE
b = iNEXTBYTE; b = iNEXTBYTE;
@ -4059,19 +4059,19 @@ int inflate(z_streamp z, int f)
z->state->mode = imBLOCKS; z->state->mode = imBLOCKS;
break; break;
} }
z->state->mode = imDICT4; z->state->mode = imDICT4; // fall through
case imDICT4: case imDICT4:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need = (uLong)iNEXTBYTE << 24; z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
z->state->mode = imDICT3; z->state->mode = imDICT3; // fall through
case imDICT3: case imDICT3:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 16; z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
z->state->mode = imDICT2; z->state->mode = imDICT2; // fall through
case imDICT2: case imDICT2:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 8; z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
z->state->mode = imDICT1; z->state->mode = imDICT1; // fall through
case imDICT1: case imDICT1:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE; z->state->sub.check.need += (uLong)iNEXTBYTE;
@ -4102,19 +4102,19 @@ int inflate(z_streamp z, int f)
z->state->mode = imDONE; z->state->mode = imDONE;
break; break;
} }
z->state->mode = imCHECK4; z->state->mode = imCHECK4; // fall through
case imCHECK4: case imCHECK4:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need = (uLong)iNEXTBYTE << 24; z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
z->state->mode = imCHECK3; z->state->mode = imCHECK3; // fall through
case imCHECK3: case imCHECK3:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 16; z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
z->state->mode = imCHECK2; z->state->mode = imCHECK2; // fall through
case imCHECK2: case imCHECK2:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 8; z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
z->state->mode = imCHECK1; z->state->mode = imCHECK1; // fall through
case imCHECK1: case imCHECK1:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE; z->state->sub.check.need += (uLong)iNEXTBYTE;
@ -4127,7 +4127,7 @@ int inflate(z_streamp z, int f)
break; break;
} }
Tracev(("inflate: zlib check ok\n")); Tracev(("inflate: zlib check ok\n"));
z->state->mode = imDONE; z->state->mode = imDONE; // fall through
case imDONE: case imDONE:
return Z_STREAM_END; return Z_STREAM_END;
case imBAD: case imBAD:

View File

@ -221,7 +221,7 @@ int ParseChunk( FILE *input ){
w--; w--;
bytesread++; bytesread++;
} while ( temp[i - 1] ); } while ( temp[i - 1] );
// fall through
case MAIN3DS: case MAIN3DS:
case OBJ_TRIMESH: case OBJ_TRIMESH:
case EDIT3DS: case EDIT3DS:

View File

@ -323,8 +323,9 @@ void InitPaths( int *argc, char **argv ){
/* remove processed arguments */ /* remove processed arguments */
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ ) 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 ]; }
argv[ i ] = argv[ j ];
if ( argv[ i ] != NULL ) { if ( argv[ i ] != NULL ) {
k++; k++;
} }

View File

@ -161,7 +161,6 @@ void ProcessWorldModel( void ){
entity_t *e; entity_t *e;
tree_t *tree; tree_t *tree;
qboolean leaked; qboolean leaked;
qboolean optimize;
xmlNodePtr polyline, leaknode; xmlNodePtr polyline, leaknode;
char level[ 2 ]; char level[ 2 ];
@ -200,7 +199,7 @@ void ProcessWorldModel( void ){
block_yh = 3; block_yh = 3;
} }
for ( optimize = false ; optimize <= true ; optimize++ ) for ( int optimize = 0; optimize <= 1; optimize++ )
{ {
Sys_FPrintf( SYS_VRB, "--------------------------------------------\n" ); Sys_FPrintf( SYS_VRB, "--------------------------------------------\n" );

View File

@ -324,7 +324,7 @@ void WriteBSP( node_t *headnode ){
void SetModelNumbers( void ){ void SetModelNumbers( void ){
int i; int i;
int models; int models;
char value[10]; char value[16];
models = 1; models = 1;
for ( i = 1 ; i < num_entities ; i++ ) for ( i = 1 ; i < num_entities ; i++ )
@ -349,7 +349,7 @@ void SetLightStyles( void ){
char *t; char *t;
entity_t *e; entity_t *e;
int i, j; int i, j;
char value[10]; char value[16];
char lighttargets[MAX_SWITCHED_LIGHTS][64]; char lighttargets[MAX_SWITCHED_LIGHTS][64];

View File

@ -252,7 +252,6 @@ void PackDirectory_r( char *dir ){
int count; int count;
struct stat st; struct stat st;
int i; int i;
int len;
char fullname[1024]; char fullname[1024];
char dirstring[1024]; char dirstring[1024];
char *name; char *name;

View File

@ -246,7 +246,7 @@ int ParseChunk( FILE *input ){
w--; w--;
bytesread++; bytesread++;
} while ( temp[i - 1] ); } while ( temp[i - 1] );
// fall through
case MAIN3DS: case MAIN3DS:
case OBJ_TRIMESH: case OBJ_TRIMESH:
case EDIT3DS: case EDIT3DS:

View File

@ -167,7 +167,7 @@ void LokiInitPaths( char *argv0 ){
/* verify the path */ /* verify the path */
if ( access( temp, X_OK ) == 0 ) { if ( access( temp, X_OK ) == 0 ) {
found++; found = true;
} }
path = last + 1; path = last + 1;
} }
@ -324,8 +324,9 @@ void InitPaths( int *argc, char **argv ){
/* remove processed arguments */ /* remove processed arguments */
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ ) 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 ]; }
argv[ i ] = argv[ j ];
if ( argv[ i ] != NULL ) { if ( argv[ i ] != NULL ) {
k++; k++;
} }

View File

@ -242,7 +242,6 @@ void PackDirectory_r( char *dir ){
int count; int count;
struct stat st; struct stat st;
int i; int i;
int len;
char fullname[1024]; char fullname[1024];
char dirstring[1024]; char dirstring[1024];
char *name; char *name;

View File

@ -222,7 +222,7 @@ int ParseChunk( FILE *input ){
w--; w--;
bytesread++; bytesread++;
} while ( temp[i - 1] ); } while ( temp[i - 1] );
// fall through
case MAIN3DS: case MAIN3DS:
case OBJ_TRIMESH: case OBJ_TRIMESH:
case EDIT3DS: case EDIT3DS:

View File

@ -1575,8 +1575,8 @@ extern int unzClose (unzFile file)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
s=(unz_s*)file; s=(unz_s*)file;
if (s->pfile_in_zip_read!=NULL) if (s->pfile_in_zip_read!=NULL)
unzCloseCurrentFile(file); unzCloseCurrentFile(file);
fclose(s->file); fclose(s->file);
free(s); free(s);
@ -1863,8 +1863,8 @@ extern int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensiti
if (file==NULL) if (file==NULL)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
s=(unz_s*)file; s=(unz_s*)file;
if (!s->current_file_ok) if (!s->current_file_ok)
@ -1939,9 +1939,9 @@ static int unzlocal_CheckCurrentFileCoherencyHeader (unz_s* s, uInt* piSizeVar,
else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method)) else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) && if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED)) (s->cur_file_info.compression_method!=Z_DEFLATED))
err=UNZ_BADZIPFILE; err=UNZ_BADZIPFILE;
if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */ if (unzlocal_getLong(s->file,&uData) != UNZ_OK) /* date/time */
err=UNZ_ERRNO; err=UNZ_ERRNO;
@ -2003,8 +2003,8 @@ extern int unzOpenCurrentFile (unzFile file)
if (!s->current_file_ok) if (!s->current_file_ok)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
if (s->pfile_in_zip_read != NULL) if (s->pfile_in_zip_read != NULL)
unzCloseCurrentFile(file); unzCloseCurrentFile(file);
if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar, if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
&offset_local_extrafield,&size_local_extrafield)!=UNZ_OK) &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
@ -3071,7 +3071,7 @@ int inflate_blocks(inflate_blocks_statef *s, z_streamp z, int r)
} }
s->sub.decode.codes = c; s->sub.decode.codes = c;
} }
s->mode = CODES; s->mode = CODES; // fall through
case CODES: case CODES:
UPDATE UPDATE
if ((r = inflate_codes(s, z, r)) != Z_STREAM_END) 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; s->mode = TYPE;
break; break;
} }
s->mode = DRY; s->mode = DRY; // fall through
case DRY: case DRY:
FLUSH FLUSH
if (s->read != s->write) if (s->read != s->write)
LEAVE LEAVE
s->mode = DONE; s->mode = DONE; // fall through
case DONE: case DONE:
r = Z_STREAM_END; r = Z_STREAM_END;
LEAVE LEAVE
@ -4019,7 +4019,7 @@ int inflate_codes(inflate_blocks_statef *s, z_streamp z, int r)
#endif /* !SLOW */ #endif /* !SLOW */
c->sub.code.need = c->lbits; c->sub.code.need = c->lbits;
c->sub.code.tree = c->ltree; c->sub.code.tree = c->ltree;
c->mode = LEN; c->mode = LEN; // fall through
case LEN: /* i: get length/literal/eob next */ case LEN: /* i: get length/literal/eob next */
j = c->sub.code.need; j = c->sub.code.need;
NEEDBITS(j) 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.need = c->dbits;
c->sub.code.tree = c->dtree; c->sub.code.tree = c->dtree;
Tracevv(("inflate: length %u\n", c->len)); Tracevv(("inflate: length %u\n", c->len));
c->mode = DIST; c->mode = DIST; // fall through
case DIST: /* i: get distance next */ case DIST: /* i: get distance next */
j = c->sub.code.need; j = c->sub.code.need;
NEEDBITS(j) 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]; c->sub.copy.dist += (uInt)b & inflate_mask[j];
DUMPBITS(j) DUMPBITS(j)
Tracevv(("inflate: distance %u\n", c->sub.copy.dist)); 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 */ case COPY: /* o: copying bytes in window, waiting for space */
#ifndef __TURBOC__ /* Turbo C bug for following expression */ #ifndef __TURBOC__ /* Turbo C bug for following expression */
f = (uInt)(q - s->window) < c->sub.copy.dist ? 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 FLUSH
if (s->read != s->write) if (s->read != s->write)
LEAVE LEAVE
c->mode = END; c->mode = END; // fall through
case END: case END:
r = Z_STREAM_END; r = Z_STREAM_END;
LEAVE LEAVE
@ -4407,7 +4407,7 @@ int inflate(z_streamp z, int f)
z->state->sub.marker = 5; /* can't try inflateSync */ z->state->sub.marker = 5; /* can't try inflateSync */
break; break;
} }
z->state->mode = imFLAG; z->state->mode = imFLAG; // fall through
case imFLAG: case imFLAG:
iNEEDBYTE iNEEDBYTE
b = iNEXTBYTE; b = iNEXTBYTE;
@ -4424,19 +4424,19 @@ int inflate(z_streamp z, int f)
z->state->mode = imBLOCKS; z->state->mode = imBLOCKS;
break; break;
} }
z->state->mode = imDICT4; z->state->mode = imDICT4; // fall through
case imDICT4: case imDICT4:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need = (uLong)iNEXTBYTE << 24; z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
z->state->mode = imDICT3; z->state->mode = imDICT3; // fall through
case imDICT3: case imDICT3:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 16; z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
z->state->mode = imDICT2; z->state->mode = imDICT2; // fall through
case imDICT2: case imDICT2:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 8; z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
z->state->mode = imDICT1; z->state->mode = imDICT1; // fall through
case imDICT1: case imDICT1:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE; z->state->sub.check.need += (uLong)iNEXTBYTE;
@ -4467,19 +4467,19 @@ int inflate(z_streamp z, int f)
z->state->mode = imDONE; z->state->mode = imDONE;
break; break;
} }
z->state->mode = imCHECK4; z->state->mode = imCHECK4; // fall through
case imCHECK4: case imCHECK4:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need = (uLong)iNEXTBYTE << 24; z->state->sub.check.need = (uLong)iNEXTBYTE << 24;
z->state->mode = imCHECK3; z->state->mode = imCHECK3; // fall through
case imCHECK3: case imCHECK3:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 16; z->state->sub.check.need += (uLong)iNEXTBYTE << 16;
z->state->mode = imCHECK2; z->state->mode = imCHECK2; // fall through
case imCHECK2: case imCHECK2:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE << 8; z->state->sub.check.need += (uLong)iNEXTBYTE << 8;
z->state->mode = imCHECK1; z->state->mode = imCHECK1; // fall through
case imCHECK1: case imCHECK1:
iNEEDBYTE iNEEDBYTE
z->state->sub.check.need += (uLong)iNEXTBYTE; z->state->sub.check.need += (uLong)iNEXTBYTE;
@ -4492,7 +4492,7 @@ int inflate(z_streamp z, int f)
break; break;
} }
Tracev(("inflate: zlib check ok\n")); Tracev(("inflate: zlib check ok\n"));
z->state->mode = imDONE; z->state->mode = imDONE; // fall through
case imDONE: case imDONE:
return Z_STREAM_END; return Z_STREAM_END;
case imBAD: case imBAD:

View File

@ -327,7 +327,6 @@ void PackDirectory_r( char *dir ){
int count; int count;
struct stat st; struct stat st;
int i; int i;
int len;
char fullname[1024]; char fullname[1024];
char dirstring[1024]; char dirstring[1024];
char *name; char *name;

View File

@ -484,8 +484,9 @@ void InitPaths( int *argc, char **argv ){
/* remove processed arguments */ /* remove processed arguments */
for ( i = 0, j = 0, k = 0; i < *argc && j < *argc; i++, j++ ) 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 ]; }
argv[ i ] = argv[ j ];
if ( argv[ i ] != NULL ) { if ( argv[ i ] != NULL ) {
k++; k++;
} }