mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Speak not the name of INT_MIN; it can upset older compilers
And more to the point, some GCCs will warn that you can't say it before C90. Bug not in any released version of Tor.
This commit is contained in:
parent
aa584fd3a3
commit
d373922217
@ -1620,7 +1620,7 @@ test_util_sscanf(void)
|
|||||||
#if SIZEOF_INT == 4
|
#if SIZEOF_INT == 4
|
||||||
r = tor_sscanf("-2147483648. 2147483647.", "%d. %d.", &int1, &int2);
|
r = tor_sscanf("-2147483648. 2147483647.", "%d. %d.", &int1, &int2);
|
||||||
test_eq(r,2);
|
test_eq(r,2);
|
||||||
test_eq(int1, -2147483648);
|
test_eq(int1, -2147483647-1);
|
||||||
test_eq(int2, 2147483647);
|
test_eq(int2, 2147483647);
|
||||||
|
|
||||||
r = tor_sscanf("-2147483679.", "%d.", &int1);
|
r = tor_sscanf("-2147483679.", "%d.", &int1);
|
||||||
@ -1632,7 +1632,7 @@ test_util_sscanf(void)
|
|||||||
r = tor_sscanf("-9223372036854775808. 9223372036854775807.",
|
r = tor_sscanf("-9223372036854775808. 9223372036854775807.",
|
||||||
"%d. %d.", &int1, &int2);
|
"%d. %d.", &int1, &int2);
|
||||||
test_eq(r,2);
|
test_eq(r,2);
|
||||||
test_eq(int1, -9223372036854775808);
|
test_eq(int1, -9223372036854775807-1);
|
||||||
test_eq(int2, 9223372036854775807);
|
test_eq(int2, 9223372036854775807);
|
||||||
|
|
||||||
r = tor_sscanf("-9223372036854775809.", "%d.", &int1);
|
r = tor_sscanf("-9223372036854775809.", "%d.", &int1);
|
||||||
|
Loading…
Reference in New Issue
Block a user