mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
build: avoid compiler warning on 32-bit platform
On a 32-bit platform: virstringtest.c: In function 'mymain': virstringtest.c:673: warning: this decimal constant is unsigned only in ISO C90 I already had a comment in the file about the 64-bit counterpart; the easiest fix was to make both sites use the standardized macro that is guaranteed to work. * tests/virstringtest.c (mymain): Minimum signed integers are a pain. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
23f38f8813
commit
c7ca02e6e2
@ -670,7 +670,7 @@ mymain(void)
|
||||
-1LL, 0, 18446744073709551615ULL, 0);
|
||||
TEST_STRTOL("-2147483647", NULL, -2147483647, 0, 2147483649U, 0,
|
||||
-2147483647LL, 0, 18446744071562067969ULL, 0);
|
||||
TEST_STRTOL("-2147483648", NULL, -2147483648, 0, 2147483648U, 0,
|
||||
TEST_STRTOL("-2147483648", NULL, INT32_MIN, 0, 2147483648U, 0,
|
||||
-2147483648LL, 0, 18446744071562067968ULL, 0);
|
||||
TEST_STRTOL("-2147483649", NULL, 0, -1, 2147483647U, 0,
|
||||
-2147483649LL, 0, 18446744071562067967ULL, 0);
|
||||
@ -680,10 +680,8 @@ mymain(void)
|
||||
-4294967296LL, 0, 18446744069414584320ULL, 0);
|
||||
TEST_STRTOL("-9223372036854775807", NULL, 0, -1, 0U, -1,
|
||||
-9223372036854775807LL, 0, 9223372036854775809ULL, 0);
|
||||
/* Bah, stupid gcc warning about -9223372036854775808LL being an
|
||||
* unrepresentable integer constant */
|
||||
TEST_STRTOL("-9223372036854775808", NULL, 0, -1, 0U, -1,
|
||||
0x8000000000000000LL, 0, 9223372036854775808ULL, 0);
|
||||
INT64_MIN, 0, 9223372036854775808ULL, 0);
|
||||
TEST_STRTOL("-9223372036854775809", NULL, 0, -1, 0U, -1,
|
||||
0LL, -1, 9223372036854775807ULL, 0);
|
||||
TEST_STRTOL("-18446744073709551615", NULL, 0, -1, 0U, -1,
|
||||
|
Loading…
Reference in New Issue
Block a user