fix g++ warnings

g++ 5.4 detects the static bools as "unused", which is true - but also
intentional.

Removing the "static" adds a lot of unused symbols to the global pool,
but it also prevents any compiler from detecting the "not used" status.
This commit is contained in:
ac-stef
2016-08-28 15:11:49 +02:00
parent 41fa9e1b34
commit e648943d40
+1 -1
View File
@@ -82,7 +82,7 @@ struct ident
enum { IEXC_CORE = 0, IEXC_CFG, IEXC_PROMPT, IEXC_MAPCFG, IEXC_MDLCFG, IEXC_NUM }; // script execution context
// nasty macros for registering script functions, abuses globals to avoid excessive infrastructure
#define COMMANDN(name, fun, sig) static bool __dummy_##fun = addcommand(#name, (void (*)())fun, sig)
#define COMMANDN(name, fun, sig) bool __dummy_##fun = addcommand(#name, (void (*)())fun, sig)
#define COMMAND(name, sig) COMMANDN(name, name, sig)
#define COMMANDF(name, sig, inlinefunc) static void __dummy_##name inlinefunc ; COMMANDN(name, __dummy_##name, sig)