From ece9f7ec72a4a20f799ee00a8fb75b8553ccff63 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 21 Sep 2022 18:53:41 -0400 Subject: [PATCH] Fix some compile warns while I'm at it --- src/cpu/386.c | 2 ++ src/ini.c | 2 +- src/video/vid_xga.c | 2 +- src/video/video.c | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cpu/386.c b/src/cpu/386.c index 662850318..48c45d342 100644 --- a/src/cpu/386.c +++ b/src/cpu/386.c @@ -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 diff --git a/src/ini.c b/src/ini.c index b3c7295cb..923d50ca9 100644 --- a/src/ini.c +++ b/src/ini.c @@ -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; diff --git a/src/video/vid_xga.c b/src/video/vid_xga.c index b83d6467d..cbec48739 100644 --- a/src/video/vid_xga.c +++ b/src/video/vid_xga.c @@ -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); diff --git a/src/video/video.c b/src/video/video.c index 2dfe48ab9..eb4997574 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -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); } }