Fix the rest of the warnings about integer sign change with ICC

None of these change the code in any way. The solutions applied are:
 - change the type to a more appropriate one, if possible
 - use ~0 instead of -1 when flags were intended
 - cast a -1 to the proper type otherwise

Change-Id: Ifcc125528f32b8c8f9ab20bea103e2a693045bf8
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Thiago Macieira
2012-05-20 21:15:30 +02:00
committed by hjk
parent 2d08cb93fc
commit ca4a5e7f03
6 changed files with 9 additions and 9 deletions

View File

@@ -96,7 +96,7 @@ private:
}; };
BreakpointDialog::BreakpointDialog(BreakpointModelId id, QWidget *parent) BreakpointDialog::BreakpointDialog(BreakpointModelId id, QWidget *parent)
: QDialog(parent), m_enabledParts(-1), m_previousType(UnknownType), : QDialog(parent), m_enabledParts(~0), m_previousType(UnknownType),
m_firstTypeChange(true) m_firstTypeChange(true)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);

View File

@@ -844,7 +844,7 @@ void CdbEngine::setupInferior()
if (startParameters().breakOnMain) { if (startParameters().breakOnMain) {
const BreakpointParameters bp(BreakpointAtMain); const BreakpointParameters bp(BreakpointAtMain);
postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings, postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings,
BreakpointModelId(-1), true), 0); BreakpointModelId(quint16(-1)), true), 0);
} }
postCommand("sxn 0x4000001f", 0); // Do not break on WowX86 exceptions. postCommand("sxn 0x4000001f", 0); // Do not break on WowX86 exceptions.
postCommand(".asm source_line", 0); // Source line in assembly postCommand(".asm source_line", 0); // Source line in assembly
@@ -1209,7 +1209,7 @@ void CdbEngine::executeRunToLine(const ContextData &data)
bp.fileName = data.fileName; bp.fileName = data.fileName;
bp.lineNumber = data.lineNumber; bp.lineNumber = data.lineNumber;
} }
postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings, BreakpointModelId(-1), true), 0); postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings, BreakpointModelId(quint16(-1)), true), 0);
continueInferior(); continueInferior();
} }
@@ -1219,7 +1219,7 @@ void CdbEngine::executeRunToFunction(const QString &functionName)
BreakpointParameters bp(BreakpointByFunction); BreakpointParameters bp(BreakpointByFunction);
bp.functionName = functionName; bp.functionName = functionName;
postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings, BreakpointModelId(-1), true), 0); postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings, BreakpointModelId(quint16(-1)), true), 0);
continueInferior(); continueInferior();
} }

View File

@@ -65,7 +65,7 @@ QString cdbSourcePathMapping(QString fileName,
// Convert breakpoint in CDB syntax (applying source path mappings using native paths). // Convert breakpoint in CDB syntax (applying source path mappings using native paths).
QByteArray cdbAddBreakpointCommand(const BreakpointParameters &d, QByteArray cdbAddBreakpointCommand(const BreakpointParameters &d,
const QList<QPair<QString, QString> > &sourcePathMapping, const QList<QPair<QString, QString> > &sourcePathMapping,
BreakpointModelId id = BreakpointModelId(-1), bool oneshot = false); BreakpointModelId id = BreakpointModelId(quint16(-1)), bool oneshot = false);
// Parse extension command listing breakpoints. // Parse extension command listing breakpoints.
// Note that not all fields are returned, since file, line, function are encoded // Note that not all fields are returned, since file, line, function are encoded
// in the expression (that is in addition deleted on resolving for a bp-type breakpoint). // in the expression (that is in addition deleted on resolving for a bp-type breakpoint).

View File

@@ -152,8 +152,8 @@ public:
void notifyInferiorIll(); void notifyInferiorIll();
void notifyEngineIll(); void notifyEngineIll();
void notifyInferiorPid(qint64 pid); void notifyInferiorPid(qint64 pid);
void showMessage(const QString &msg, quint16 channel = LogDebug, quint64 timeout = -1); void showMessage(const QString &msg, quint16 channel = LogDebug, quint64 timeout = quint64(-1));
void showStatusMessage(const QString &msg, quint64 timeout = -1); void showStatusMessage(const QString &msg, quint64 timeout = quint64(-1));
void currentFrameChanged(qint64 token); void currentFrameChanged(qint64 token);
void currentThreadChanged(qint64 token); void currentThreadChanged(qint64 token);

View File

@@ -278,7 +278,7 @@ QByteArray GLSLEditorPlugin::glslFile(const QString &fileName) const
void GLSLEditorPlugin::parseGlslFile(const QString &fileName, InitFile *initFile) const void GLSLEditorPlugin::parseGlslFile(const QString &fileName, InitFile *initFile) const
{ {
// Parse the builtins for any langugage variant so we can use all keywords. // Parse the builtins for any langugage variant so we can use all keywords.
const unsigned variant = GLSL::Lexer::Variant_All; const int variant = GLSL::Lexer::Variant_All;
const QByteArray code = glslFile(fileName); const QByteArray code = glslFile(fileName);
initFile->engine = new GLSL::Engine(); initFile->engine = new GLSL::Engine();

View File

@@ -330,7 +330,7 @@ void RefactoringFile::apply()
{ {
// open / activate / goto position // open / activate / goto position
if (m_openEditor && !m_fileName.isEmpty()) { if (m_openEditor && !m_fileName.isEmpty()) {
unsigned line = -1, column = -1; unsigned line = unsigned(-1), column = unsigned(-1);
if (m_editorCursorPosition != -1) if (m_editorCursorPosition != -1)
lineAndColumn(m_editorCursorPosition, &line, &column); lineAndColumn(m_editorCursorPosition, &line, &column);
m_editor = RefactoringChanges::openEditor(m_fileName, m_activateEditor, line, column); m_editor = RefactoringChanges::openEditor(m_fileName, m_activateEditor, line, column);