From 8a5657b9f721bb2301358080353e1d6f3fcf2174 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 31 Oct 2013 16:15:51 +0100 Subject: fix warnings about unused variables & parameters Change-Id: Ia5816671267ea21dae0d90560b239c4498f9156c Reviewed-by: Joerg Bornemann --- qmake/generators/integrity/gbuild.cpp | 1 + qmake/generators/mac/pbuilder_pbx.cpp | 1 + qmake/option.cpp | 9 ++++----- src/corelib/io/qsettings.cpp | 4 +++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index 8a3a75b7d9..e8e992b694 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -417,6 +417,7 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove bool GBuildMakefileGenerator::openOutput(QFile &file, const QString &build) const { + Q_UNUSED(build) debug_msg(1, "file is %s", file.fileName().toLatin1().constData()); QFileInfo fi(file); if (fi.filePath().isEmpty()) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 68338a6684..5ea1ff14b9 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1797,6 +1797,7 @@ ProjectBuilderMakefileGenerator::reftypeForFile(const QString &where) QString ProjectBuilderMakefileGenerator::sourceTreeForFile(const QString &where) { + Q_UNUSED(where) // We always use absolute paths, instead of maintaining the SRCROOT // build variable and making files relative to that. return QLatin1String(""); diff --git a/qmake/option.cpp b/qmake/option.cpp index 86d55835f8..7b93144d82 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -531,12 +531,11 @@ Option::fixString(QString string, uchar flags) string = QDir::cleanPath(string); } - bool localSep = (flags & Option::FixPathToLocalSeparators) != 0; - bool targetSep = (flags & Option::FixPathToTargetSeparators) != 0; - bool normalSep = (flags & Option::FixPathToNormalSeparators) != 0; - // either none or only one active flag - Q_ASSERT(localSep + targetSep + normalSep <= 1); + Q_ASSERT(((flags & Option::FixPathToLocalSeparators) != 0) + + ((flags & Option::FixPathToTargetSeparators) != 0) + + ((flags & Option::FixPathToNormalSeparators) != 0) <= 1); + //fix separators if (flags & Option::FixPathToNormalSeparators) { string = string.replace('\\', '/'); diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index c78b355ac1..35b3ed4e3d 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -890,7 +890,9 @@ StNormal: ++j; } -#ifndef QT_NO_TEXTCODEC +#ifdef QT_NO_TEXTCODEC + Q_UNUSED(codec) +#else if (codec) { stringResult += codec->toUnicode(str.constData() + i, j - i); } else -- cgit v1.2.3