From: Alan Modra Date: Fri, 6 Aug 2021 10:16:22 +0000 (+0930) Subject: chew ubsan warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7eb7e4cdcc625d9253fe8f3c42d3312c52f61d94;p=binutils-gdb.git chew ubsan warning It matters not at all if pc is incremented from its initial NULL value, but avoid this silly runtime ubsan error. * doc/chew.c (perform): Avoid incrementing NULL pc. --- diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c index b3be7fa9cda..9271cd107f9 100644 --- a/bfd/doc/chew.c +++ b/bfd/doc/chew.c @@ -1301,12 +1301,12 @@ perform (void) { if (warning) fprintf (stderr, "warning, %s is not recognised\n", next); - skip_past_newline (); + idx = skip_past_newline_1 (ptr, idx); } free (next); } else - skip_past_newline (); + idx = skip_past_newline_1 (ptr, idx); } }