diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-03-08 21:01:19 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-03-08 21:16:46 -0500 |
commit | c4bfc7ca0e9ed95e184a6dc8ea1220988e7ca937 (patch) | |
tree | 022e0498da788b2d895f588cb7d45c36be8564d1 /src/test | |
parent | 97b15e6fb0a1cda39adfadfe9f9926b6cf35b136 (diff) | |
download | tor-c4bfc7ca0e9ed95e184a6dc8ea1220988e7ca937.tar tor-c4bfc7ca0e9ed95e184a6dc8ea1220988e7ca937.tar.gz |
Disable some tor_sscanf tests that gcc says are illegal formats
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 5bbf448ad..0187187c0 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -1384,9 +1384,12 @@ test_util_sscanf(void) test_eq(-1, tor_sscanf("wrong", "%5c", s1)); /* %c cannot have a number. */ test_eq(-1, tor_sscanf("hello", "%s", s1)); /* %s needs a number. */ test_eq(-1, tor_sscanf("prettylongstring", "%999999s", s1)); - test_eq(-1, tor_sscanf("prettylongstring", "%0s", s1)); test_eq(-1, tor_sscanf("We're the 99 monkeys", "We're the 99%%")); +#if 0 + /* GCC thinks these two are illegal. */ + test_eq(-1, tor_sscanf("prettylongstring", "%0s", s1)); test_eq(0, tor_sscanf("prettylongstring", "%10s", NULL)); +#endif /* No '%'-strings: always "success" */ test_eq(0, tor_sscanf("hello world", "hello world")); test_eq(0, tor_sscanf("hello world", "good bye")); |