mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
fix more warnings emerged by Travis CI
This commit is contained in:
parent
7b413032e7
commit
229dc77170
@ -1829,7 +1829,7 @@ void deh_procPointer(DEHFILE *fpin, FILE* fpout, char *line) // done
|
||||
states[indexnum].action = deh_codeptr[value];
|
||||
if (fpout) fprintf(fpout," - applied %p from codeptr[%ld] to states[%d]\n",deh_codeptr[value],value,indexnum);
|
||||
// Write BEX-oriented line to match:
|
||||
for (i=0;i<NUMSTATES;i++)
|
||||
for (i=0;i<arrlen(deh_bexptrs);i++)
|
||||
{
|
||||
if (deh_bexptrs[i].cptr == deh_codeptr[value])
|
||||
{
|
||||
|
@ -978,7 +978,11 @@ void FindResponseFile (void)
|
||||
size = ftell(handle);
|
||||
fseek(handle,0,SEEK_SET);
|
||||
file = malloc (size);
|
||||
fread(file,size,1,handle);
|
||||
if (!fread(file,size,1,handle))
|
||||
{
|
||||
free(file);
|
||||
return;
|
||||
}
|
||||
fclose(handle);
|
||||
|
||||
// KEEP ALL CMDLINE ARGS FOLLOWING @RESPONSEFILE ARG
|
||||
|
@ -64,7 +64,7 @@ __inline__ static fixed_t FixedMul(fixed_t a, fixed_t b)
|
||||
|
||||
__inline__ static fixed_t FixedDiv(fixed_t a, fixed_t b)
|
||||
{
|
||||
return (abs(a)>>14) >= abs(b) ? ((a^b)>>31) ^ D_MAXINT :
|
||||
return (abs(a)>>14) >= abs(b) ? ((unsigned)(a^b)>>31) ^ D_MAXINT :
|
||||
(fixed_t)(((Long64) a << FRACBITS) / b);
|
||||
}
|
||||
|
||||
|
@ -852,7 +852,12 @@ void M_ReadSaveStrings(void)
|
||||
LoadMenu[i].status = 0;
|
||||
continue;
|
||||
}
|
||||
fread(&savegamestrings[i], SAVESTRINGSIZE, 1, fp);
|
||||
if (!fread(&savegamestrings[i], SAVESTRINGSIZE, 1, fp))
|
||||
{
|
||||
strcpy(&savegamestrings[i][0],s_EMPTYSTRING);
|
||||
LoadMenu[i].status = 0;
|
||||
continue;
|
||||
}
|
||||
fclose(fp);
|
||||
LoadMenu[i].status = 1;
|
||||
}
|
||||
|
@ -758,7 +758,11 @@ int main(int argc,char **argv)
|
||||
musst = fopen(musfile,"rb");
|
||||
if (musst)
|
||||
{
|
||||
fread(&MUSh,sizeof(MUSheader),1,musst);
|
||||
if(!fread(&MUSh,sizeof(MUSheader),1,musst))
|
||||
{
|
||||
printf("Error reading MUS file\n");
|
||||
exit(1);
|
||||
}
|
||||
mus = malloc(MUSh.ScoreLength+MUSh.ScoreStart);
|
||||
if (mus)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user