summaryrefslogtreecommitdiff
path: root/include/linux/n_r3964.h
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-12-20 17:23:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-12 19:44:56 +0100
commitc9fd3741c4c70554ae2758a5f3f6d70b29c32270 (patch)
treed0ebdd4ef52fe19320218a598f7e66d4f3855d5d /include/linux/n_r3964.h
parent0de45bfea6076710a64a9937a1bf6a64fd66b319 (diff)
drbd: Avoid Clang warning about pointless switch statment
[ Upstream commit a52c5a16cf19d8a85831bb1b915a221dd4ffae3c ] There are several warnings from Clang about no case statement matching the constant 0: In file included from drivers/block/drbd/drbd_receiver.c:48: In file included from drivers/block/drbd/drbd_int.h:48: In file included from ./include/linux/drbd_genl_api.h:54: In file included from ./include/linux/genl_magic_struct.h:236: ./include/linux/drbd_genl.h:321:1: warning: no case matching constant switch condition '0' GENL_struct(DRBD_NLA_HELPER, 24, drbd_helper_info, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/genl_magic_struct.h:220:10: note: expanded from macro 'GENL_struct' switch (0) { ^ Silence this warning by adding a 'case 0:' statement. Additionally, adjust the alignment of the statements in the ct_assert_unique macro to avoid a checkpatch warning. This solution was originally sent by Arnd Bergmann with a default case statement: https://lore.kernel.org/patchwork/patch/756723/ Link: https://github.com/ClangBuiltLinux/linux/issues/43 Suggested-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/n_r3964.h')
0 files changed, 0 insertions, 0 deletions