From 2ec0d5abc6b9f8d13e208880098903487d7cad67 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 30 May 2014 16:47:19 +0100 Subject: [PATCH] Fix a compiler warning about signed/unsigned comparisons The "+ 1" was causing an unsigned value to be cast to a signed value, which was then compared with an unsigned value, causing the warning. Making the constant unsigned fixes this. --- src/imageformats/pic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/pic.cpp b/src/imageformats/pic.cpp index db15096..64930f1 100644 --- a/src/imageformats/pic.cpp +++ b/src/imageformats/pic.cpp @@ -340,7 +340,7 @@ static void encodeMixedRLEData(QDataStream &stream, const Item *data, unsigned l chunkLength = 1; chunkEnd = chunkStart + 1; while (chunkLength < maxChunk && - (chunkLength + 1 == maxChunk || + (chunkLength + 1u == maxChunk || !itemsEqual(*chunkEnd, *(chunkEnd+1)))) { ++chunkEnd;