OSDN Git Service

Fix gcc warnings about signed/unsigned comparison
authorKai Koehne <kai.koehne@nokia.com>
Thu, 11 Aug 2011 11:16:09 +0000 (13:16 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Fri, 12 Aug 2011 09:19:37 +0000 (11:19 +0200)
Change-Id: I43f0de47dccf67da2f4b622f70c76a69198286d5
Reviewed-on: http://codereview.qt.nokia.com/2860
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
src/plugins/bineditor/bineditor.cpp
src/plugins/cppeditor/cppeditor.cpp

index 191e934..a8a04e2 100644 (file)
@@ -731,7 +731,7 @@ void BinEditor::paintEvent(QPaintEvent *e)
     QString itemString(m_bytesPerLine*3, QLatin1Char(' '));
     QChar *itemStringData = itemString.data();
     char changedString[160] = { false };
-    QTC_ASSERT(m_bytesPerLine < sizeof(changedString), return);
+    QTC_ASSERT((size_t)m_bytesPerLine < sizeof(changedString), return);
     const char *hex = "0123456789abcdef";
 
     painter.setPen(palette().text().color());
index bc07e4f..420d64f 100644 (file)
@@ -2159,7 +2159,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
 
     m_mutex.lock();
     if (! source.force
-            && m_lastSemanticInfo.revision == source.revision
+            && m_lastSemanticInfo.revision == (unsigned)source.revision
             && m_lastSemanticInfo.doc
             && m_lastSemanticInfo.doc->translationUnit()->ast()
             && m_lastSemanticInfo.doc->fileName() == source.fileName) {