summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-08-03 13:54:12 -0400
committerNick Mathewson <nickm@torproject.org>2012-08-03 13:54:12 -0400
commitd373922217dc8c2c2f1bcb243f2b8b08379d0582 (patch)
tree1f0df2c203c1efdbf6ba95332486050f49522306 /src/test
parentaa584fd3a3888de836bb5c23b7372676c557a735 (diff)
downloadtor-d373922217dc8c2c2f1bcb243f2b8b08379d0582.tar.gz
tor-d373922217dc8c2c2f1bcb243f2b8b08379d0582.zip
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.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 5c119d339b..64976f3390 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -1620,7 +1620,7 @@ test_util_sscanf(void)
#if SIZEOF_INT == 4
r = tor_sscanf("-2147483648. 2147483647.", "%d. %d.", &int1, &int2);
test_eq(r,2);
- test_eq(int1, -2147483648);
+ test_eq(int1, -2147483647-1);
test_eq(int2, 2147483647);
r = tor_sscanf("-2147483679.", "%d.", &int1);
@@ -1632,7 +1632,7 @@ test_util_sscanf(void)
r = tor_sscanf("-9223372036854775808. 9223372036854775807.",
"%d. %d.", &int1, &int2);
test_eq(r,2);
- test_eq(int1, -9223372036854775808);
+ test_eq(int1, -9223372036854775807-1);
test_eq(int2, 9223372036854775807);
r = tor_sscanf("-9223372036854775809.", "%d.", &int1);