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>
This commit is contained in:
Mitch Curtis 2012-11-20 14:57:16 +01:00 committed by The Qt Project
parent 3791d21f72
commit 3249439b20
7 changed files with 7 additions and 4 deletions

View File

@ -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");

View File

@ -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]

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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);
}
};

View File

@ -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;