From 0f23ec4e241e5dec0958c6c62ade597a9bb98a75 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 28 Oct 2016 00:43:35 +0300 Subject: [PATCH] Eliminate 'comparison of signed and unsigned int' GCC warning (test_cpp) (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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 17fa41e..024efae 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -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" -- 2.7.4