[PATCH] bfd: Add WARN_CFLAGS_FOR_BUILD to doc/chew.c build, fix warnings

Alan Modra amodra@gmail.com
Tue Nov 12 21:03:23 GMT 2024


On Fri, Nov 08, 2024 at 12:08:46PM +0100, Mark Wielaard wrote:
> doc/chew.c was compiled without any warning flags set. Adding the
> common warnings for build showed various issues with non-static
> functions missing prototypes and globals with common names (ptr and
> idx) that shadowed local arguments or variables.
> 
>      * doc/local.mk (doc/chew.stamp): Add WARN_CFLAGS_FOR_BUILD.
>      * Makefile.in: Regenerate.
>      * doc/chew.c (idx): Rename to pos_idx.
>      (ptr): Rename to buf_ptr.
>      (xmalloc): Make static.
>      (xrealloc): Likewise.
>      (xstrdup): Likewise.
>      (nextword): Likewise.
>      (newentry): Likewise.
>      (add_to_definition): Likewise.
>      (add_intrinsic): Likewise.
>      (compile): Likewise.
>      (icopy_past_newline): Rename idx to pos_idx, ptr to buf_ptr.
>      (get_stuff_in_command): Likewise.
>      (skip_past_newline): Likewise.
>      (perform): Likewise.
>      (main): Likewise.

OK, thanks.

-- 
Alan Modra


More information about the Binutils mailing list