From a37314c4bee4d0e9dc0a3c8aab8369594cbd05f8 Mon Sep 17 00:00:00 2001 From: negativeExponent Date: Sun, 16 Feb 2020 23:14:49 +0800 Subject: [PATCH] Silence warnings --- src/boards/emu2413.c | 4 ++-- src/cheat.c | 2 +- src/unif.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/boards/emu2413.c b/src/boards/emu2413.c index a9fabb3..7859c73 100644 --- a/src/boards/emu2413.c +++ b/src/boards/emu2413.c @@ -555,10 +555,10 @@ static void maketables(uint32 c, uint32 r) { } } -OPLL *OPLL_new(uint32 clk, uint32 rate) { +OPLL *OPLL_new(uint32 _clk, uint32 _rate) { OPLL *opll; - maketables(clk, rate); + maketables(_clk, _rate); opll = (OPLL*)calloc(sizeof(OPLL), 1); if (opll == NULL) diff --git a/src/cheat.c b/src/cheat.c index 2ce582a..f92e8d4 100644 --- a/src/cheat.c +++ b/src/cheat.c @@ -417,7 +417,7 @@ int FCEUI_SetCheat(uint32 which, const char *name, int32 a, int32 v, int compare if (name) { char *t; - if ((t = (char*)realloc(next->name, strlen(name + 1)))) { + if ((t = (char*)realloc(next->name, strlen(name) + 1))) { next->name = t; strcpy(next->name, name); } else diff --git a/src/unif.c b/src/unif.c index 035132d..6d5e666 100644 --- a/src/unif.c +++ b/src/unif.c @@ -797,8 +797,8 @@ int UNIFLoad(const char *name, FCEUFILE *fp) { if (UNIFCart.mapper) FCEU_printf(" [Unif] Mapper: %d\n", UNIFCart.mapper); FCEU_printf(" [Unif] SubMapper: %d\n", UNIFCart.submapper); - FCEU_printf(" [Unif] PRG ROM: %d KiB\n", UNIF_PRGROMSize >> 10); - FCEU_printf(" [Unif] CHR ROM: %d KiB\n", UNIF_CHRROMSize / 1024); + FCEU_printf(" [Unif] PRG ROM: %ull KiB\n", UNIF_PRGROMSize / 1024); + FCEU_printf(" [Unif] CHR ROM: %ull KiB\n", UNIF_CHRROMSize / 1024); GameInterface = UNIFGI; return 1;