diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-07-01 14:48:06 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-07-07 06:31:03 +0000 |
commit | a858ce0039cb63a6a0afdfabab80ad4adc98ce17 (patch) | |
tree | 7899e62eb6985230ad43dd14cba497447b04769f /src/imports/localstorage | |
parent | ac44a5b574289e8a24c7ad76760fdbb0a0728478 (diff) |
localstorage: disable warning about tautological comparison
When building with gcc 6.1.1, there is a warning like this:
plugin.cpp:152:126: error: self-comparison always evaluates to true [-Werror=tautological-compare]
DEFINE_OBJECT_VTABLE(QV4::QQmlSqlDatabaseWrapper);
In the definition of DEFINE_OBJECT_VTABLE, the comparison
&classname::SuperClass::static_vtbl == &Object::static_vtbl ? 0 : &classname::SuperClass::static_vtbl.vTable
will be done at runtime. Maybe the macro could somehow do
that at compile time (or maybe the compiler will optimize
it away after detecting that the result is constant);
but for now, this warning breaks the build.
Task-number: QTBUG-53373
Change-Id: I5f8e429a3f1446d3ef931ff8b0c41fcf652f7a02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/imports/localstorage')
-rw-r--r-- | src/imports/localstorage/plugin.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index a043af6b46..fbcb6ddea5 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -149,7 +149,12 @@ public: using namespace QV4; +QT_WARNING_PUSH +#if (Q_CC_GNU >= 600) +QT_WARNING_DISABLE_GCC("-Wtautological-compare") +#endif DEFINE_OBJECT_VTABLE(QV4::QQmlSqlDatabaseWrapper); +QT_WARNING_POP |