+2009-11-19 Eric Blake <ebb9@byu.net>
+
+ test-xvasprintf: silence compiler warnings
+ * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Mask
+ empty string from gcc.
+
2009-11-19 Jim Meyering <meyering@redhat.com>
xfreopen: new module, from coreutils
free (result);
}
- result = my_xasprintf ("");
- ASSERT (result != NULL);
- ASSERT (strcmp (result, "") == 0);
- free (result);
+ {
+ /* Silence gcc warning about zero-length format string. */
+ char *empty = "";
+ result = my_xasprintf (empty);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
result = my_xasprintf ("%s", "foo");
ASSERT (result != NULL);
free (result);
}
- result = xasprintf ("");
- ASSERT (result != NULL);
- ASSERT (strcmp (result, "") == 0);
- free (result);
+ {
+ /* Silence gcc warning about zero-length format string. */
+ char *empty = "";
+ result = xasprintf (empty);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
result = xasprintf ("%s", "foo");
ASSERT (result != NULL);