Fixes warnings
In QString, it would comlain that: assuming signed overflow does not occur when assuming that (X - c) > X is always false Changing to unsigned comparison fix the warning Others are about unused variables Reviewed-by: Thiago (cherry picked from commit 5e5485809e8c6f8339bb9f19ad71ed623a8b23c7)bb10
parent
bd64c94a26
commit
12c96812f9
|
|
@ -356,6 +356,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
|
|||
const QByteArray &path = entry.nativeFilePath();
|
||||
nativeFilePath = path.constData();
|
||||
nativeFilePathLength = path.size();
|
||||
Q_UNUSED(nativeFilePathLength);
|
||||
}
|
||||
|
||||
bool entryExists = true; // innocent until proven otherwise
|
||||
|
|
|
|||
|
|
@ -2782,8 +2782,6 @@ bool QLocalePrivate::numberToCLocale(const QString &num,
|
|||
if (idx == l)
|
||||
return false;
|
||||
|
||||
const QChar _group = group();
|
||||
|
||||
while (idx < l) {
|
||||
const QChar &in = uc[idx];
|
||||
|
||||
|
|
|
|||
|
|
@ -695,9 +695,9 @@ inline QString::QString(const QLatin1String &aLatin1) : d(fromLatin1_helper(aLat
|
|||
inline int QString::length() const
|
||||
{ return d->size; }
|
||||
inline const QChar QString::at(int i) const
|
||||
{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
|
||||
{ Q_ASSERT(uint(i) < uint(size())); return d->data[i]; }
|
||||
inline const QChar QString::operator[](int i) const
|
||||
{ Q_ASSERT(i >= 0 && i < size()); return d->data[i]; }
|
||||
{ Q_ASSERT(uint(i) < uint(size())); return d->data[i]; }
|
||||
inline const QChar QString::operator[](uint i) const
|
||||
{ Q_ASSERT(i < uint(size())); return d->data[i]; }
|
||||
inline bool QString::isEmpty() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue