Fix some compile warns while I'm at it

This commit is contained in:
Jasmine Iwanek
2022-09-21 18:53:41 -04:00
parent 28ae786d62
commit ece9f7ec72
4 changed files with 6 additions and 4 deletions

View File

@@ -69,6 +69,7 @@ x386_log(const char *fmt, ...)
#include "x86_flags.h"
/*
#define getbytef() \
((uint8_t) (fetchdat)); \
cpu_state.pc++
@@ -81,6 +82,7 @@ x386_log(const char *fmt, ...)
#define getword2f() \
((uint16_t) (fetchdat >> 8)); \
cpu_state.pc += 2
*/
#define OP_TABLE(name) ops_##name

View File

@@ -275,7 +275,7 @@ ini_detect_bom(char *fn)
#endif
if (f == NULL)
return (0);
fread(bom, 1, 3, f);
(void) !fread(bom, 1, 3, f);
if (bom[0] == 0xEF && bom[1] == 0xBB && bom[2] == 0xBF) {
fclose(f);
return 1;

View File

@@ -2688,7 +2688,7 @@ static void
rom = malloc(xga->bios_rom.sz);
memset(rom, 0xff, xga->bios_rom.sz);
(void) fread(rom, xga->bios_rom.sz, 1, f);
(void) !fread(rom, xga->bios_rom.sz, 1, f);
temp -= xga->bios_rom.sz;
(void) fclose(f);

View File

@@ -996,9 +996,9 @@ loadfont_common(FILE *f, int format)
for (d = 0; d < 4; d++) {
/* There are 4 fonts in the ROM */
for (c = 0; c < 256; c++) /* 8x14 MDA in 8x16 cell */
fread(&fontdatm[256 * d + c][0], 1, 16, f);
(void) !fread(&fontdatm[256 * d + c][0], 1, 16, f);
for (c = 0; c < 256; c++) { /* 8x8 CGA in 8x16 cell */
fread(&fontdat[256 * d + c][0], 1, 8, f);
(void) !fread(&fontdat[256 * d + c][0], 1, 8, f);
fseek(f, 8, SEEK_CUR);
}
}