Re: [PATCH v2] kbuild: enforce -Werror=unused-result
From: Masahiro Yamada
Date: Thu Mar 25 2021 - 13:34:24 EST
On Fri, Mar 26, 2021 at 2:07 AM Olaf Hering <olaf@xxxxxxxxx> wrote:
>
> Am Fri, 26 Mar 2021 01:55:41 +0900
> schrieb Masahiro Yamada <masahiroy@xxxxxxxxxx>:
>
> > What about drivers/net/ethernet/lantiq_etop.c ?
>
> Nothing complained about it. I guess there is a build-bot for alpha, but none for mips.
>
> > I got a lot of complaints in the last trial.
>
> Why did you get complains, instead of me?
>
>
> What is the "must" in "__must_check" worth if it is not enforced...
>
> Olaf
In hindsight, __must_check may not be a perfect name.
Miguel suggested __nodiscard to get along with:
https://en.cppreference.com/w/c/language/attributes/nodiscard
It is not enforcing. Just a compiler warning.
--
Best Regards
Masahiro Yamada