Re: [PATCH] audit: avoid -Wempty-body warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 6:58 PM Richard Guy Briggs wrote: > > On 2021-03-22 17:28, Arnd Bergmann wrote: > > On Mon, Mar 22, 2021 at 3:33 PM Richard Guy Briggs wrote: > > > > Change the macros to use the usual "do { } while (0)" instead, and > > > > change a > > > > few more that were (void)0,

Re: [PATCH] audit: avoid -Wempty-body warning

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

Re: [PATCH] audit: avoid -Wempty-body warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 3:33 PM Richard Guy Briggs 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

Re: [PATCH] audit: avoid -Wempty-body warning

2021-03-22 Thread Richard Guy Briggs
On 2021-03-22 12:45, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc warns about an empty statement when audit_remove_mark is defined to > nothing: > > kernel/auditfilter.c: In function 'audit_data_to_entry': > kernel/auditfilter.c:609:51: error: suggest braces around empty body in an >

[PATCH] audit: avoid -Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann gcc warns about an empty statement when audit_remove_mark is defined to nothing: kernel/auditfilter.c: In function 'audit_data_to_entry': kernel/auditfilter.c:609:51: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 609 |