]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Disable some tor_sscanf tests that gcc says are illegal formats
authorNick Mathewson <nickm@torproject.org>
Fri, 9 Mar 2012 02:01:19 +0000 (21:01 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 9 Mar 2012 02:16:46 +0000 (21:16 -0500)
src/test/test_util.c

index 5bbf448adf25acadf5b3982204a1d21bac98c50f..0187187c0a8e94f3704da9c87bc1525f5175742e 100644 (file)
@@ -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"));