From 4d120800fa63433e2fc2d76d69178431d53ba29e Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Sat, 23 Jul 2016 14:04:56 +0300 Subject: ALL: Don't use 'defined' in macro definitions This is undefined behavior and clang warns about it. See . --- base/plugins.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'base/plugins.h') 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) -- cgit v1.2.3