forked from qt-creator/qt-creator
Fix change-of-sign warning found by ICC
-1 is not a valid unsigned value. registerhandler.cpp(354): warning #68: integer conversion resulted in a change of sign return createIndex(row, col, TopLevelId); ^ Change-Id: I41935255704f19724d6cec16ea470e2f8f8a16a1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -284,7 +284,7 @@ unsigned int AndroidDeployStep::remoteModificationTime(const QString &fullDestin
|
|||||||
process.waitForFinished(-1);
|
process.waitForFinished(-1);
|
||||||
if (process.error() != QProcess::UnknownError
|
if (process.error() != QProcess::UnknownError
|
||||||
|| process.exitCode() != 0)
|
|| process.exitCode() != 0)
|
||||||
return -1;
|
return 0;
|
||||||
QByteArray output = process.readAll();
|
QByteArray output = process.readAll();
|
||||||
output.replace("\r\n", "\n");
|
output.replace("\r\n", "\n");
|
||||||
QList<QByteArray> lines = output.split('\n');
|
QList<QByteArray> lines = output.split('\n');
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ int IncludeGroup::lineForNewInclude(const QString &newIncludeFileName,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (isSorted()) {
|
if (isSorted()) {
|
||||||
const Include newInclude(newIncludeFileName, QString(), -1, newIncludeType);
|
const Include newInclude(newIncludeFileName, QString(), 0, newIncludeType);
|
||||||
const QList<Include>::const_iterator it = std::lower_bound(m_includes.begin(),
|
const QList<Include>::const_iterator it = std::lower_bound(m_includes.begin(),
|
||||||
m_includes.end(), newInclude, includeFileNamelessThen);
|
m_includes.end(), newInclude, includeFileNamelessThen);
|
||||||
if (it == m_includes.end())
|
if (it == m_includes.end())
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ uchar fromhex(uchar c)
|
|||||||
return 10 + c - 'a';
|
return 10 + c - 'a';
|
||||||
if (c >= 'A' && c <= 'Z')
|
if (c >= 'A' && c <= 'Z')
|
||||||
return 10 + c - 'A';
|
return 10 + c - 'A';
|
||||||
return -1;
|
return UCHAR_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
void skipCommas(const char *&from, const char *to)
|
void skipCommas(const char *&from, const char *to)
|
||||||
@@ -141,7 +141,7 @@ QByteArray GdbMi::parseCString(const char *&from, const char *to)
|
|||||||
uchar prod = 0;
|
uchar prod = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
uchar val = fromhex(c);
|
uchar val = fromhex(c);
|
||||||
if (val == uchar(-1))
|
if (val == UCHAR_MAX)
|
||||||
break;
|
break;
|
||||||
prod = prod * 16 + val;
|
prod = prod * 16 + val;
|
||||||
if (++chars == 3 || src == end)
|
if (++chars == 3 || src == end)
|
||||||
|
|||||||
@@ -642,7 +642,7 @@ void QmlLiveTextPreview::editorContentsChanged()
|
|||||||
|
|
||||||
void QmlLiveTextPreview::onAutomaticUpdateFailed()
|
void QmlLiveTextPreview::onAutomaticUpdateFailed()
|
||||||
{
|
{
|
||||||
showSyncWarning(AutomaticUpdateFailed, QString(), -1, -1);
|
showSyncWarning(AutomaticUpdateFailed, QString(), UINT_MAX, UINT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<int> QmlLiveTextPreview::objectReferencesForOffset(quint32 offset)
|
QList<int> QmlLiveTextPreview::objectReferencesForOffset(quint32 offset)
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ static int bitWidthFromType(int type, int subType)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int TopLevelId = -1;
|
static const uint TopLevelId = UINT_MAX;
|
||||||
static bool isTopLevelItem(const QModelIndex &index)
|
static bool isTopLevelItem(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
return quintptr(index.internalId()) == quintptr(TopLevelId);
|
return quintptr(index.internalId()) == quintptr(TopLevelId);
|
||||||
|
|||||||
Reference in New Issue
Block a user