From c52449fd4aacdf76e726082a3a01ee210cbf5465 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Tue, 19 Apr 2022 11:54:14 +0100 Subject: [PATCH] Fix some warnings from newer GCC versions There are others that require changing code flow to fix, perhaps I will do those later --- source/video.c | 8 ++++---- source/wad.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/video.c b/source/video.c index 5fd492a..c223edb 100644 --- a/source/video.c +++ b/source/video.c @@ -46,14 +46,14 @@ void Con_ClearLine(void) void Con_FgColor(u32 color, u8 bold) { /* Set foreground color */ - printf("\x1b[%lu;%um", color + 30, bold); + printf("\x1b[%u;%um", color + 30, bold); fflush(stdout); } void Con_BgColor(u32 color, u8 bold) { /* Set background color */ - printf("\x1b[%lu;%um", color + 40, bold); + printf("\x1b[%u;%um", color + 40, bold); fflush(stdout); } @@ -63,7 +63,7 @@ void Con_FillRow(u32 row, u32 color, u8 bold) u32 cnt; /* Set color */ - printf("\x1b[%lu;%um", color + 40, bold); + printf("\x1b[%u;%um", color + 40, bold); fflush(stdout); /* Get console metrics */ @@ -74,7 +74,7 @@ void Con_FillRow(u32 row, u32 color, u8 bold) fflush(stdout); /* Move to specified row */ - printf("\x1b[%lu;0H", row); + printf("\x1b[%u;0H", row); fflush(stdout); /* Fill row */ diff --git a/source/wad.c b/source/wad.c index 36aee55..73b1711 100644 --- a/source/wad.c +++ b/source/wad.c @@ -72,7 +72,7 @@ u64 get_title_ios(u64 title) { //printf("Error! ES_GetStoredTMDSize: %d\n", ret); - sprintf(filepath, "/title/%08lx/%08lx/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title)); + sprintf(filepath, "/title/%08x/%08x/content/title.tmd", TITLE_UPPER(title), TITLE_LOWER(title)); ret = ISFS_Open(filepath, ISFS_OPEN_READ); if (ret <= 0) @@ -326,7 +326,7 @@ s32 Wad_Install(FILE *fp) if(TITLE_LOWER(tmd_data->sys_version) != 0 && isIOSstub(TITLE_LOWER(tmd_data->sys_version))) { - printf("\n This Title wants IOS%li but the installed version\n is a stub.\n", TITLE_LOWER(tmd_data->sys_version)); + printf("\n This Title wants IOS%i but the installed version\n is a stub.\n", TITLE_LOWER(tmd_data->sys_version)); ret = -999; goto err; } @@ -448,7 +448,7 @@ s32 Wad_Install(FILE *fp) Con_ClearLine(); - printf("\r\t\t>> Installing content #%02ld...", content->cid); + printf("\r\t\t>> Installing content #%02d...", content->cid); fflush(stdout); /* Encrypted content size */