]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix compilation in !wxUSE_LOG_DEBUG && !HAVE_VARIADIC_MACROS case.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 May 2012 16:49:11 +0000 (16:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 May 2012 16:49:11 +0000 (16:49 +0000)
Define the "unused" variable unless wxLogDebug() calls are variadic macros
(not evaluating their arguments at all) and not functions.

Fixes compilation broken since r71466.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/markupparser.cpp

index cb87983b0e72f86b0d0f1bdfee96fc27da963b7b..929543c0a755570cd5b8fcc716b4ef042ae4356c 100644 (file)
@@ -279,7 +279,12 @@ bool wxMarkupParser::Parse(const wxString& text)
                         m_output.OnText(current);
                         current.clear();
                     }
-#if wxUSE_LOG_DEBUG
+
+                    // This variable is used only in the debugging messages
+                    // and doesn't need to be defined if they're not compiled
+                    // at all (it actually would result in unused variable
+                    // messages in this case).
+#if wxUSE_LOG_DEBUG && defined(HAVE_VARIADIC_MACROS)
                     // Remember the tag starting position for the error
                     // messages.
                     const size_t pos = it - text.begin();