Browse Source

bc: Add 'U' suffix in UINT_MAX preprocessor check

Without the 'U' unsigned suffix, gcc will throw a "integer constant is
so large that it is unsigned" warning.

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Kang-Che Sung 4 years ago
parent
commit
f159352112
1 changed files with 2 additions and 2 deletions
  1. 2 2
      miscutils/bc.c

+ 2 - 2
miscutils/bc.c

@@ -844,10 +844,10 @@ struct globals {
 # error Strange INT_MAX
 #endif
 
-#if UINT_MAX == 4294967295
+#if UINT_MAX == 4294967295U
 # define BC_MAX_SCALE_STR  "4294967295"
 # define BC_MAX_STRING_STR "4294967294"
-#elif UINT_MAX == 18446744073709551615
+#elif UINT_MAX == 18446744073709551615U
 # define BC_MAX_SCALE_STR  "18446744073709551615"
 # define BC_MAX_STRING_STR "18446744073709551614"
 #else