forked from qt-creator/qt-creator
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: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -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)
|
static bool isCompleteStringLiteral(const BackwardsScanner &tk, int index)
|
||||||
{
|
{
|
||||||
const QStringRef text = tk.textRef(index);
|
const QStringRef text = tk.textRef(index);
|
||||||
|
Reference in New Issue
Block a user