summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2012-11-20 14:57:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-21 18:23:59 +0100
commit3249439b203123ca277b931a34814f383715b0e8 (patch)
tree7767c6a514c99d217ff9d5718561ad5582296412
parent3791d21f72a4c7035cd1db42c36dbd1dc7efd0f6 (diff)
Remove warnings from qtbase.
geometryengine.cpp: In member function 'void GeometryEngine::drawCubeGeometry(QGLShaderProgram*)': geometryengine.cpp:159:93: warning: cast to pointer from integer of different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95: warning: cast to pointer f rom integer ofdifferent size [-Wint-to-pointer-cast] benchmarking.cpp: In member function 'void TestBenchmark::multiple()': benchmarking.cpp:85:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] benchmarking.cpp: In member function 'void TestBenchmark::series()': benchmarking.cpp:120:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] qstandarditemmodel.cpp:2717:45: warning: unused variable 'd' [-Wunused-variable] qxcbconnection.cpp: In member function 'xcb_timestamp_t QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning: suggest parentheses around assignment used as truth value [-Wparentheses] tst_qguiapplication.cpp: In constructor 'BlockableWindow::BlockableWindow()': tst_qguiapplication.cpp:340:9: warning:'BlockableWindow::enters' will be initialized after [-Wreorder] tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves' [-Wreorder] tst_qguiapplication.cpp:342:12: waring: when initialized here [-Wreorder] tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value' [-Wunused-parameter] tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index' [-Wunused-parameter] Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--examples/opengl/cube/geometryengine.cpp2
-rw-r--r--examples/qtestlib/tutorial5/benchmarking.cpp2
-rw-r--r--src/gui/itemmodels/qstandarditemmodel.cpp1
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp2
-rw-r--r--tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp2
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp1
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp1
7 files changed, 7 insertions, 4 deletions
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index e3d14d95de..d8dfeab822 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -151,7 +151,7 @@ void GeometryEngine::drawCubeGeometry(QGLShaderProgram *program)
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vboIds[1]);
// Offset for position
- int offset = 0;
+ quintptr offset = 0;
// Tell OpenGL programmable pipeline how to locate vertex position data
int vertexLocation = program->attributeLocation("a_position");
diff --git a/examples/qtestlib/tutorial5/benchmarking.cpp b/examples/qtestlib/tutorial5/benchmarking.cpp
index c731677c1b..3a245f22cb 100644
--- a/examples/qtestlib/tutorial5/benchmarking.cpp
+++ b/examples/qtestlib/tutorial5/benchmarking.cpp
@@ -92,6 +92,7 @@ void TestBenchmark::multiple()
result = (str1 == str2);
}
}
+ Q_UNUSED(result);
}
//! [2]
@@ -127,6 +128,7 @@ void TestBenchmark::series()
result = (str1 == str2);
}
}
+ Q_UNUSED(result);
}
//! [5]
diff --git a/src/gui/itemmodels/qstandarditemmodel.cpp b/src/gui/itemmodels/qstandarditemmodel.cpp
index 13d7a5c7a7..079be121d5 100644
--- a/src/gui/itemmodels/qstandarditemmodel.cpp
+++ b/src/gui/itemmodels/qstandarditemmodel.cpp
@@ -2714,7 +2714,6 @@ bool QStandardItemModel::hasChildren(const QModelIndex &parent) const
*/
QModelIndex QStandardItemModel::sibling(int row, int column, const QModelIndex &idx) const
{
- Q_D(const QStandardItemModel);
return createIndex(row, column, idx.internalPointer());
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 405a16d488..b5756bd06c 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -927,7 +927,7 @@ xcb_timestamp_t QXcbConnection::getTimestamp()
// to add the new set of events to its event queue
while (true) {
connection()->sync();
- if (event = checkEvent(checker))
+ if ((event = checkEvent(checker)))
break;
}
diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
index 3417e18b7f..4c64d0f58a 100644
--- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
+++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp
@@ -340,7 +340,7 @@ public:
int enters;
inline BlockableWindow()
- : QWindow(), blocked(false), enters(0), leaves(0) {}
+ : QWindow(), blocked(false), leaves(0), enters(0) {}
bool event(QEvent *e)
{
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index 0e9420fcbe..b6a0a7b1fa 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -569,6 +569,7 @@ public:
SetRecordReimplModel(QObject *parent, QSqlDatabase db):QSqlTableModel(parent, db) {}
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole)
{
+ Q_UNUSED(value);
return QSqlTableModel::setData(index, QString("Qt"), role);
}
};
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 8ccd13ff3e..b068413632 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -1544,6 +1544,7 @@ public:
{}
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE {
+ Q_UNUSED(index);
static bool w = true;
editor->setEnabled(w);
w = !w;