summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-08-30 14:25:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-07 18:41:22 +0200
commitecbaa69d71992e6447df7b40b0c4e0dc6f255654 (patch)
tree3e1f124776aa0d968ec78e1f470df1d9a44f3012
parent3a48320fd6335d21451f07cb68336404177e2d87 (diff)
Logging: Fix mingw32-gcc compiler warning about unused variable
Change-Id: I985c2096e604a3cb14eb3a41c4f12aa28f0ea681 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/global/qlogging.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 64bc3b2726..38c2522ff1 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -95,8 +95,7 @@ QT_BEGIN_NAMESPACE
extern bool usingWinMain;
#endif
-#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) || defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
-static void convert_to_wchar_t_elided(wchar_t *d, size_t space, const char *s) Q_DECL_NOEXCEPT
+static inline void convert_to_wchar_t_elided(wchar_t *d, size_t space, const char *s) Q_DECL_NOEXCEPT
{
size_t len = qstrlen(s);
if (len + 1 > space) {
@@ -109,7 +108,6 @@ static void convert_to_wchar_t_elided(wchar_t *d, size_t space, const char *s) Q
*d++ = *s++;
*d++ = 0;
}
-#endif
#if !defined(QT_NO_EXCEPTIONS)
/*!
@@ -122,7 +120,8 @@ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) Q_DECL
{
char emergency_buf[256] = { '\0' };
emergency_buf[sizeof emergency_buf - 1] = '\0';
-#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) || defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
+#if defined(Q_OS_WIN) && defined(QT_BUILD_CORE_LIB) && defined(Q_OS_WINCE) \
+ || defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
wchar_t emergency_bufL[sizeof emergency_buf];
#endif