]> granicus.if.org Git - gc/commitdiff
Eliminate 'comparison of signed and unsigned int' GCC warning (test_cpp)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 27 Oct 2016 21:43:35 +0000 (00:43 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 27 Oct 2016 21:43:35 +0000 (00:43 +0300)
(fix commit 1868a90)

* tests/test_cpp.cc [LINT2] (main): Cast unsigned immediate value to
int (before comparison to n local variable).

tests/test_cpp.cc

index 17fa41ea70e2376ae11f2b1b7190865baeece8a6..024efae4337077b083fef5f11fae4d0cc41715e4 100644 (file)
@@ -254,7 +254,7 @@ void* Undisguise( GC_word i ) {
     if (argc != 2
         || (n = atoi(argv[1])) <= 0
 #       ifdef LINT2
-          || n >= (((unsigned)-1) >> 1) - 1
+          || n >= (int)(~0U >> 1) - 1
 #       endif
        ) {
       GC_printf("usage: test_cpp number-of-iterations\n"