linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jules Irenge <jbi.octave@gmail.com>,
	linux-audit@redhat.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] audit: avoid -Wempty-body warning
Date: Mon, 22 Mar 2021 13:58:21 -0400	[thread overview]
Message-ID: <20210322175821.GO3141668@madcap2.tricolour.ca> (raw)
In-Reply-To: <CAK8P3a2NkB7COUetdq65cSNjVe7-96c44=4JE5BXkBwXG-5nyQ@mail.gmail.com>

On 2021-03-22 17:28, Arnd Bergmann wrote:
> On Mon, Mar 22, 2021 at 3:33 PM Richard Guy Briggs <rgb@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.

Ok, cool, that looks more consistent.  Can you answer my question about
include/linux/audit.h and exactly what conditions require
"do { } while (0)" over "{ }"?

>          Arnd

- RGB

--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


  reply	other threads:[~2021-03-22 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 11:45 [PATCH] audit: avoid -Wempty-body warning Arnd Bergmann
2021-03-22 14:33 ` Richard Guy Briggs
2021-03-22 16:28   ` Arnd Bergmann
2021-03-22 17:58     ` Richard Guy Briggs [this message]
2021-03-22 18:24       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210322175821.GO3141668@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=arnd@kernel.org \
    --cc=jbi.octave@gmail.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).