diff options
author | Ori Avtalion | 2016-07-23 14:04:56 +0300 |
---|---|---|
committer | Ori Avtalion | 2016-07-23 16:18:51 +0300 |
commit | 4d120800fa63433e2fc2d76d69178431d53ba29e (patch) | |
tree | 4b7053a1d0d33be624e845149c90d127071e3bb1 /base | |
parent | 2e4dd165e936dd0cce01df505993cbe49bb335d4 (diff) | |
download | scummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.tar.gz scummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.tar.bz2 scummvm-rg350-4d120800fa63433e2fc2d76d69178431d53ba29e.zip |
ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
Diffstat (limited to 'base')
-rw-r--r-- | base/plugins.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/plugins.h b/base/plugins.h index 6037fc2d71..2793ff3ffd 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -79,8 +79,12 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; #define PLUGIN_ENABLED_STATIC(ID) \ (ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID)) -#define PLUGIN_ENABLED_DYNAMIC(ID) \ - (ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) +#ifdef DYNAMIC_MODULES + #define PLUGIN_ENABLED_DYNAMIC(ID) \ + (ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN)) +#else + #define PLUGIN_ENABLED_DYNAMIC(ID) 0 +#endif // see comments in backends/plugins/elf/elf-provider.cpp #if defined(USE_ELF_LOADER) && defined(ELF_LOADER_CXA_ATEXIT) |