Skip to content
Commit 9de82caa authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Dan Williams
Browse files

dax: avoid -Wempty-body warnings



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.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210322114514.3490752-1-arnd@kernel.org


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 1e28eed1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment