]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Work around apparently-bogus warning from gcc 10.
authorJulian Seward <jseward@acm.org>
Fri, 24 Jan 2020 10:02:53 +0000 (11:02 +0100)
committerJulian Seward <jseward@acm.org>
Fri, 24 Jan 2020 10:02:53 +0000 (11:02 +0100)
include/pub_tool_options.h

index 58fbf612dc1e33802c2cd80038ce6b5380abafe7..e2a896d675247b1f55214da6a67e5eb6381e954c 100644 (file)
@@ -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; }))