Re: [PATCH] ELF: add and use SUPRESS_WARN_UNUSED_RESULT\

From: Alexey Dobriyan
Date: Sat Jun 26 2021 - 02:47:01 EST


On Fri, Jun 25, 2021 at 11:57:21PM +0200, Miguel Ojeda wrote:
> On Fri, Jun 25, 2021 at 11:10 PM Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> >
> > This is natural place. If you're supressing WUR, then the WUR macro
> > itself is defined implying that the header has been included.
>
> I am not sure I understand -- I guess you are saying that your macro
> is only ever needed if `__must_check` is defined, which is what I
> meant by "related".
>
> But this header was intentionally created to untangle others by
> keeping only attributes here.

Sure. But then developer needs to include another header to use SUPRESS_WUR.
As posted, attribute and its suppressor go hand to hand.