From 149d03af77dfc12b5b977c30d9a2de7afe26385e Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 6 Jan 2022 23:57:01 +0000 Subject: Fix a couple of other latent woopsies The format string one is cool because it implies the Windows code was also always wrong but the Windows headers aren't annotated for Clang so I guess that means it doesn't warn. At least for the nonstandard Windows wide character versions of things. Cool! --- src/gameinfo.c | 6 +++--- src/os.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gameinfo.c b/src/gameinfo.c index de5fafc..a5f1a42 100644 --- a/src/gameinfo.c +++ b/src/gameinfo.c @@ -54,7 +54,7 @@ static int storeargs(int argc, char *argv[]) { return 0; } __attribute__((used, section(".init_array"))) -static void *pstoreargs = &storeargs; +static void *pstoreargs = (void *)&storeargs; #endif // case insensitive substring match, expects s2 to be lowercase already! @@ -333,8 +333,8 @@ bool gameinfo_init(void) { } os_char gameinfopath[PATH_MAX]; if (os_snprintf(gameinfopath, PATH_MAX, OS_LIT("%s/gameinfo.txt"), - gamedir, modname) >= PATH_MAX) { - con_warn("gameinfo: gameinfo.text path is too long!\n"); + gamedir) >= PATH_MAX) { + con_warn("gameinfo: gameinfo.txt path is too long!\n"); return false; } diff --git a/src/os.h b/src/os.h index d231e67..0b4d5e1 100644 --- a/src/os.h +++ b/src/os.h @@ -42,6 +42,7 @@ #else #include #include +#include #include #include #include -- cgit v1.2.3