Re: [PATCH] dax: avoid -Wempty-body warnings
Dan Williams <[email protected]>
| Newsgroups | org.01.lists.linux-nvdimm,dev.linux.lists.nvdimm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAPcyv4h-FS96xxnX0GLOfQ7G0arNL_f4=fpP1ag3GrfLn-Mt-g@mail.gmail.com> |
On Mon, Mar 22, 2021 at 4:45 AM Arnd Bergmann <[email protected]> wrote: > > From: Arnd Bergmann <[email protected]> > > gcc warns about an empty body in an else statement: > > drivers/dax/bus.c: In function 'do_id_store': > drivers/dax/bus.c:94:48: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] > 94 | /* nothing to remove */; > | ^ > drivers/dax/bus.c:99:43: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] > 99 | /* dax_id already added */; > | ^ > > In both of these cases, the 'else' exists only to have a place to > add a comment, but that comment doesn't really explain that much > either, so the easiest way to shut up that warning is to just > remove the else. Ok, applied, thanks. _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]