Skip to content
Snippets Groups Projects
Commit 1b93bdca authored by Kai Koehne's avatar Kai Koehne
Browse files

Disable gcc warning about always-true Q_ASSERT check

gcc 4.5.1 warned about the Q_ASSERT in QStringRef::at() being
always false for isCompleteStringLiteral, isCompleteCharLiteral.

Change-Id: Idb20f81f92876eff685166c8deeebd6e151303b1
Reviewed-on: http://codereview.qt.nokia.com/3070


Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 1b2f1f10
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,15 @@ static bool shouldOverrideChar(QChar ch)
}
}
// disable gcc warning:
//
// qstring.h:1175:39: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false
//
// caused by Q_ASSERT in QStringRef::at()
#ifdef Q_CC_GNU
# pragma GCC diagnostic ignored "-Wstrict-overflow"
#endif
static bool isCompleteStringLiteral(const BackwardsScanner &tk, int index)
{
const QStringRef text = tk.textRef(index);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment