mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
and yet more warning fixes uncovered by Travis CI
This commit is contained in:
parent
229dc77170
commit
960c30c342
@ -980,6 +980,7 @@ void FindResponseFile (void)
|
||||
file = malloc (size);
|
||||
if (!fread(file,size,1,handle))
|
||||
{
|
||||
fclose(handle);
|
||||
free(file);
|
||||
return;
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ void ST_loadGraphics(void)
|
||||
{
|
||||
sprintf(namebuf, "STTNUM%d", i);
|
||||
tallnum[i] = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
|
||||
sprintf(namebuf, "STYSNUM%d", i);
|
||||
snprintf(namebuf, sizeof(namebuf), "STYSNUM%d", i);
|
||||
shortnum[i] = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,8 @@ static void W_AddFile(const char *name) // killough 1/31/98: static, const
|
||||
else
|
||||
{
|
||||
// WAD file
|
||||
read(handle, &header, sizeof(header));
|
||||
if (!read(handle, &header, sizeof(header)))
|
||||
I_Error("Wad file %s doesn't have IWAD or PWAD id\n", filename);
|
||||
if (strncmp(header.identification,"IWAD",4) &&
|
||||
strncmp(header.identification,"PWAD",4))
|
||||
I_Error("Wad file %s doesn't have IWAD or PWAD id\n", filename);
|
||||
@ -186,7 +187,8 @@ static void W_AddFile(const char *name) // killough 1/31/98: static, const
|
||||
length = header.numlumps*sizeof(filelump_t);
|
||||
fileinfo2free = fileinfo = malloc(length); // killough
|
||||
lseek(handle, header.infotableofs, SEEK_SET);
|
||||
read(handle, fileinfo, length);
|
||||
if (!read(handle, fileinfo, length))
|
||||
I_Error("Error reading lump directory from %s\n", filename);
|
||||
numlumps += header.numlumps;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user