Re: [PATCH v3 00/14] tools/nolibc: enable compiler warnings

From: Willy Tarreau
Date: Sat Aug 05 2023 - 12:55:21 EST


On Thu, Aug 03, 2023 at 09:28:44AM +0200, Thomas Weißschuh wrote:
> To help the developers to avoid mistakes and keep the code smaller let's
> enable compiler warnings.

All the series looks good, I've now queued it, thanks!

> I stuck with __attribute__((unused)) over __maybe_unused in
> nolibc-test.c for consistency with nolibc proper.
> If we want to add a define it needs to be added twice once for nolibc
> proper and once for nolibc-test otherwise libc-test wouldn't build
> anymore.

I tend to prefer to avoid spreading macros in nolibc itself unless
strictly necessary as we'd need to put them under a "nolibc" namespace
to avoid a risk of clash, and it becomes less interesting in terms of
number of characters saved per line when everything is prefixed with
"nolibc_" or so. It's convenient however when there are multiple
choices to be replicated at multiple places. So let's keep it like
this for now.

Cheers,
Willy