From 8167e3ad64276676f07d1ba7b9473c2ce74b64e3 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Fri, 25 Oct 2019 08:13:26 -0500 Subject: [PATCH] LU-12904 build: Support for gcc -Wimplicit-fallthrough Linux 5.3 enables -Wimplicit-fallthrough Add decorators for implicit-fallthrough compiler checks. Test-Parameters: trivial Cray-bug-id: LUS-8042 Signed-off-by: Shaun Tancheff Change-Id: I740062e60e1d19b967ec6b91970cdd3ab03cbab6 Reviewed-on: https://review.whamcloud.com/36577 Tested-by: jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Neil Brown Reviewed-by: Petros Koutoupis Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_handler.c | 1 + lustre/osd-zfs/osd_object.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 7603903..ac39725 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4319,6 +4319,7 @@ static int mdt_intent_opc(enum ldlm_intent_flags it_opc, break; case IT_GETATTR: check_mdt_object = true; + /* fallthrough */ case IT_LOOKUP: it_format = &RQF_LDLM_INTENT_GETATTR; it_handler = &mdt_intent_getattr; diff --git a/lustre/osd-zfs/osd_object.c b/lustre/osd-zfs/osd_object.c index 3329093..c281207 100644 --- a/lustre/osd-zfs/osd_object.c +++ b/lustre/osd-zfs/osd_object.c @@ -1486,6 +1486,7 @@ static int osd_declare_create(const struct lu_env *env, struct dt_object *dt, switch (dof->dof_type) { case DFT_DIR: dt->do_index_ops = &osd_dir_ops; + /* fallthrough */ case DFT_INDEX: /* for zap create */ dmu_tx_hold_zap(oh->ot_tx, DMU_NEW_OBJECT, FALSE, NULL); -- 1.8.3.1