diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-03-22 12:34:29 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-01-12 08:16:30 +0100 |
commit | 4bb12f228fd8adcfd247f6a8f4decb322dcb4788 (patch) | |
tree | 5c9b151a40f531242f1713250b57a8b360f44ca5 /cpukit/libfs/src/jffs2/src/acl.h | |
parent | jffs2: Fix kasan slab-out-of-bounds problem (diff) | |
download | rtems-4bb12f228fd8adcfd247f6a8f4decb322dcb4788.tar.bz2 |
jffs2: avoid Wempty-body warnings
Building with W=1 shows a few warnings for empty macros:
fs/jffs2/scan.c: In function 'jffs2_scan_xattr_node':
fs/jffs2/scan.c:378:66: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
378 | jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset);
| ^
fs/jffs2/scan.c: In function 'jffs2_scan_xref_node':
fs/jffs2/scan.c:434:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
434 | jffs2_sum_add_xref_mem(s, rr, ofs - jeb->offset);
| ^
fs/jffs2/scan.c: In function 'jffs2_scan_eraseblock':
fs/jffs2/scan.c:893:88: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
893 | jffs2_sum_add_padding_mem(s, je32_to_cpu(node->totlen));
| ^
Change all these macros to 'do { } while (0)' statements to avoid the
warnings and make the code a little more robust.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions