summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 15:27:32 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-07 19:21:51 +0000
commit84b9d071630a63a493773f612eefe83c8e68390d (patch)
tree49bc85b2579ba99db34c6e369c7f25d43cd81111 /src/corelib/tools
parent8972ceea871f9737303132761b79f531763a6852 (diff)
Silence bogus MSVC warning about variable not used
The compiler is wrong: the variable was used in the previous line. However, the line had no effect for a type T that has a trivial destructor, so the optimizer must have discarded the line and the reference to the variable before the checker for used variables. qsharedpointer_impl.h(247) : warning C4189: 'that' : local variable is initialized but not referenced Change-Id: Ia0aac2f09e9245339951ffff13c8bde02bb46816 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 8cccc83e9d..9e6b48a97d 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -247,6 +247,7 @@ namespace QtSharedPointer {
ExternalRefCountWithContiguousData *that =
static_cast<ExternalRefCountWithContiguousData *>(self);
that->data.~T();
+ Q_UNUSED(that); // MSVC warns if T has a trivial destructor
}
static void safetyCheckDeleter(ExternalRefCountData *self)
{