From 7eb7e4cdcc625d9253fe8f3c42d3312c52f61d94 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 6 Aug 2021 19:46:22 +0930 Subject: [PATCH] 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. --- bfd/doc/chew.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } -- 2.30.2