-// avoid warnings about unused static variable
-#if defined(__WXDEBUG__) && defined(HAVE_VARIADIC_MACROS)
+// avoid warnings about unused static variable (notice that we still use it
+// even in release build if the compiler doesn't support variadic macros)
+#if defined(__WXDEBUG__) || !defined(HAVE_VARIADIC_MACROS)