]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
jffs2: Fix if/else empty body warnings
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 5 Apr 2020 21:22:56 +0000 (14:22 -0700)
committerRichard Weinberger <richard@nod.at>
Sun, 13 Dec 2020 20:51:54 +0000 (21:51 +0100)
commit8fdaaf4cf3cea64aed8265a62c4ea7158ac0aa09
tree8fd398a3711406abd8535d0d54b357248469d982
parentb8f1da98a219ab8c371fae5c3efb4b90b8594f3b
jffs2: Fix if/else empty body warnings

When debug (print) macros are not enabled, change them to use the
no_printk() macro instead of <nothing>. This fixes gcc warnings when
-Wextra is used:

../fs/jffs2/nodelist.c:255:37: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../fs/jffs2/nodelist.c:278:38: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../fs/jffs2/nodelist.c:558:52: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../fs/jffs2/xattr.c:1247:58: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
../fs/jffs2/xattr.c:1281:65: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Builds without warnings on all 3 levels of CONFIG_JFFS2_FS_DEBUG.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/jffs2/debug.h