Browse Source

lib_static: fix warnings

pull/2/head
mittorn 5 years ago
parent
commit
a0d09c9954
  1. 4
      engine/platform/misc/lib_static.c
  2. 2
      scripts/waifulib/xshlib.py

4
engine/platform/misc/lib_static.c

@ -14,7 +14,7 @@ GNU General Public License for more details. @@ -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 ) @@ -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 )

2
scripts/waifulib/xshlib.py

@ -84,7 +84,7 @@ def apply_static(main, *reloc): @@ -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 ))

Loading…
Cancel
Save