From b5684ee49003e2c71acc12a8f4120295ecb6bcf6 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 14 Sep 2023 12:33:18 +0200 Subject: [PATCH] Utils: Fix warning regarding incompatible signedness Change-Id: I0b035ec53d65d636ace121d0d155249eebad2f8d Reviewed-by: Xavier BESSON Reviewed-by: David Schulz --- src/libs/utils/uncommentselection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/uncommentselection.cpp b/src/libs/utils/uncommentselection.cpp index 8cce4c86a02..5f9217a08cc 100644 --- a/src/libs/utils/uncommentselection.cpp +++ b/src/libs/utils/uncommentselection.cpp @@ -10,6 +10,8 @@ #include #include +#include + namespace Utils { CommentDefinition CommentDefinition::CppStyle = CommentDefinition("//", "/*", "*/"); @@ -176,7 +178,7 @@ QTextCursor unCommentSelection(const QTextCursor &cursorIn, } const int singleLineLength = definition.singleLine.length(); - unsigned int minTab = -1; + int minTab = INT_MAX; if (definition.isAfterWhitespace && !doSingleLineStyleUncomment) { for (QTextBlock block = startBlock; block != endBlock && minTab != 0; block = block.next()) { QTextCursor c(block);