2gsformats.c: fix compilation warnings

This commit is contained in:
Thomas Bernard 2021-05-03 23:43:22 +02:00
parent 39ee4d1eae
commit d64e10a628
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF

View File

@ -194,7 +194,7 @@ void Load_2GS(T_IO_Context * context)
if (p) if (p)
{ {
fread(p, 1, len, file); fread(p, 1, len, file);
GFX2_LogHexDump(GFX2_DEBUG, "", p, 0 /*offset + 4 + 13*/, (long)len); GFX2_LogHexDump(GFX2_DEBUG, "", (byte *)p, 0 /*offset + 4 + 13*/, (long)len);
} }
} }
else if (c == 8 && 0 == memcmp(p, "MULTIPAL", 8)) else if (c == 8 && 0 == memcmp(p, "MULTIPAL", 8))
@ -264,6 +264,9 @@ void Load_2GS(T_IO_Context * context)
break; break;
case 3: // byte packed x 4 case 3: // byte packed x 4
count <<= 2; count <<= 2;
#if defined(__GNUC__) && (__GNUC__ >= 7)
__attribute__ ((fallthrough));
#endif
case 1: // byte packed case 1: // byte packed
if (!Read_byte(file, &pixel)) if (!Read_byte(file, &pixel))
goto error; goto error;