* tests/test-userspec.c (main): A test release of gcc,
9.0.1
20190310, warned that this test would attempt to
print a NULL pointer via a %s printf format. Fix that
and remove the unnecessary preceding "!diag" conjunct.
Also add a comment.
+2019-03-09 Jim Meyering <meyering@fb.com>
+
+ test-userspec.c: don't print NULL
+ * tests/test-userspec.c (main): A test release of gcc,
+ 9.0.1 20190310, warned that this test would attempt to
+ print a NULL pointer via a %s printf format. Fix that
+ and remove the unnecessary preceding "!diag" conjunct.
+ Also add a comment.
+
2019-03-03 Bruno Haible <bruno@clisp.org>
getloadavg: Write NULL for the null pointer.
fail = 1;
}
- if (!diag && !T[i].result)
+ if (!T[i].result)
continue;
- printf ("%s diagnostic mismatch (-: expected uid,gid; +:actual)\n"
+ /* Expected a non-NULL result diagnostic, yet got NULL. */
+ diag = "NULL";
+ printf ("%s diagnostic mismatch (-: expected diagnostic; +:actual)\n"
"-%s\n+%s\n", T[i].in, T[i].result, diag);
fail = 1;
}