From e648943d40e57a485b0219e79d0231197093cebd Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sun, 28 Aug 2016 15:11:49 +0200 Subject: [PATCH] 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. --- source/src/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/command.h b/source/src/command.h index 7f3593af..04711662 100644 --- a/source/src/command.h +++ b/source/src/command.h @@ -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)