diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-13 15:52:56 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-04-15 10:10:46 +0000 |
commit | 2748661ddd3033ca3e6bcf3fe16633ab75a598aa (patch) | |
tree | 4928f9810ea67b39156915aca1920a6bca4d5209 /src/tools/moc/generator.cpp | |
parent | 939f21be53efabc37b7682a72effab716d8b9410 (diff) |
Work around MSVC warnings about unused variables in moc output
Change 8836a4d5f0fbbb already added Q_UNUSED in one place,
but that was not enough.
Change-Id: Ib98ba3fe47c0903cc01c56fd3eb8461c8938c75e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc/generator.cpp')
-rw-r--r-- | src/tools/moc/generator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 46acbc608b..8b6a0519c5 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1310,6 +1310,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " %s *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData(), cdef->classname.constData()); } + fprintf(out, " Q_UNUSED(_t)\n"); if (needTempVarForGet) fprintf(out, " void *_v = _a[0];\n"); fprintf(out, " switch (_id) {\n"); @@ -1355,6 +1356,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " %s *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData(), cdef->classname.constData()); } + fprintf(out, " Q_UNUSED(_t)\n"); fprintf(out, " void *_v = _a[0];\n"); fprintf(out, " switch (_id) {\n"); for (int propindex = 0; propindex < cdef->propertyList.size(); ++propindex) { @@ -1408,6 +1410,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " %s *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData(), cdef->classname.constData()); } + fprintf(out, " Q_UNUSED(_t)\n"); fprintf(out, " switch (_id) {\n"); for (int propindex = 0; propindex < cdef->propertyList.size(); ++propindex) { const PropertyDef &p = cdef->propertyList.at(propindex); |