From: Julian Seward Date: Fri, 24 Jan 2020 10:02:53 +0000 (+0100) Subject: Work around apparently-bogus warning from gcc 10. X-Git-Tag: VALGRIND_3_16_0~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c39fd9a0098648e19ab6e436a515dc0d9fd387e;p=thirdparty%2Fvalgrind.git Work around apparently-bogus warning from gcc 10. --- diff --git a/include/pub_tool_options.h b/include/pub_tool_options.h index 58fbf612dc..e2a896d675 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; }))