[PATCH] audit: avoid -Wempty-body warning

Arnd Bergmann arnd at kernel.org
Mon Mar 22 16:28:01 UTC 2021


On Mon, Mar 22, 2021 at 3:33 PM Richard Guy Briggs <rgb at redhat.com> wrote:

> > Change the macros to use the usual "do { } while (0)" instead, and change a
> > few more that were (void)0, for consistency.
>
> So what about audit_put_watch() and audit_get_watch() which are set to
> {}?   (And all of include/linux/audit.h that uses the latter...)  Does
> this only matter if they are the only action called in an if or loop?
>

I missed those, thanks for pointing it out. I sent a v2 patch now.

         Arnd




More information about the Linux-audit mailing list