|
From: Julian S. <se...@so...> - 2020-01-24 10:03:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4c39fd9a0098648e19ab6e436a515dc0d9fd387e commit 4c39fd9a0098648e19ab6e436a515dc0d9fd387e Author: Julian Seward <js...@ac...> Date: Fri Jan 24 11:02:53 2020 +0100 Work around apparently-bogus warning from gcc 10. Diff: --- include/pub_tool_options.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/pub_tool_options.h b/include/pub_tool_options.h index 58fbf61..e2a896d 100644 --- a/include/pub_tool_options.h +++ b/include/pub_tool_options.h @@ -128,7 +128,10 @@ extern void VG_(list_clo)(const HChar *qq_option); if VG_STREQ(val, "yes") (qq_var) = True; \ else if VG_STREQ(val, "no") (qq_var) = False; \ else {VG_(fmsg_bad_option)(qq_arg, "Invalid boolean value '%s'" \ - " (should be 'yes' or 'no')\n", val); \ + " (should be 'yes' or 'no')\n", \ + /* gcc 10 (20200119) complains that |val| could be null here. */ \ + /* I think it is wrong, but anyway, to placate it .. */ \ + (val ? val : "(null)")); \ res = False; } \ res; })) |