summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-05-16 11:21:18 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-06-14 09:09:13 (GMT)
commitc169eeaf3886955d74b41f150e1035ee93c8c5c4 (patch)
treef9e0c400e26f590bbe8b32e15d4176f8f159e05e
parent4746bad937a4abfc413aa56f316fc25115fe0525 (diff)
downloadQt-c169eeaf3886955d74b41f150e1035ee93c8c5c4.zip
Qt-c169eeaf3886955d74b41f150e1035ee93c8c5c4.tar.gz
Qt-c169eeaf3886955d74b41f150e1035ee93c8c5c4.tar.bz2
Silence the "array out of bounds" warning in GCC 4.6.
I can't find anything wrong with this code, so tell GCC simply to shut up. Reviewed-by: Trust Me
-rw-r--r--src/opengl/qgl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2b0c8f8..4e941c6 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -366,6 +366,10 @@ void QGL::setPreferredPaintEngine(QPaintEngine::Type engineType)
static inline void transform_point(GLdouble out[4], const GLdouble m[16], const GLdouble in[4])
{
+#if defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
#define M(row,col) m[col*4+row]
out[0] =
M(0, 0) * in[0] + M(0, 1) * in[1] + M(0, 2) * in[2] + M(0, 3) * in[3];
@@ -376,6 +380,9 @@ static inline void transform_point(GLdouble out[4], const GLdouble m[16], const
out[3] =
M(3, 0) * in[0] + M(3, 1) * in[1] + M(3, 2) * in[2] + M(3, 3) * in[3];
#undef M
+#if defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+# pragma GCC diagnostic pop
+#endif
}
static inline GLint qgluProject(GLdouble objx, GLdouble objy, GLdouble objz,