From a0d09c9954fb3ef23dd6cb10955af3f420fd3252 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 8 Feb 2020 23:39:35 +0700 Subject: [PATCH] lib_static: fix warnings --- engine/platform/misc/lib_static.c | 4 ++-- scripts/waifulib/xshlib.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/platform/misc/lib_static.c b/engine/platform/misc/lib_static.c index 7db5cdbd..f5f16552 100644 --- a/engine/platform/misc/lib_static.c +++ b/engine/platform/misc/lib_static.c @@ -14,7 +14,7 @@ GNU General Public License for more details. */ #include "platform/platform.h" - +#include "library.h" #if XASH_LIB == LIB_STATIC #ifdef XASH_NO_LIBDL @@ -71,7 +71,7 @@ static void *Lib_Find(table_t *tbl, const char *name ) void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean directpath ) { - return Lib_Find(libs, dllname); + return Lib_Find((table_t*)libs, dllname); } void COM_FreeLibrary( void *hInstance ) diff --git a/scripts/waifulib/xshlib.py b/scripts/waifulib/xshlib.py index 8eb70bdd..abe5d1b7 100644 --- a/scripts/waifulib/xshlib.py +++ b/scripts/waifulib/xshlib.py @@ -84,7 +84,7 @@ def apply_static(main, *reloc): "generate exports list for library" exports = in_node.read().split('\n') - externs = '\n'.join(['extern void %s();' % e for e in exports]) + externs = '\n'.join(['extern void %s(void);' % e for e in exports]) table = '\n'.join(['{ "%s", &%s },' % (e, e) for e in exports]) out_node.write('%s\nstruct {const char *name;void *func;} lib_%s_exports[] = {\n%s\n{0,0}\n};\n' % (externs, name, table ))