From 8519260acf8986002552fc4ee1fc803d192d9780 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Sun, 23 Feb 2025 20:50:28 -0500 Subject: [PATCH] LU-16518 obdclass: fix unused-but-set-variable warnings Remove swab variable in class_config_yaml_output() that is not being used. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I0db780c98fe34cef91988fc3f8c2ccac9481de2c Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58179 Reviewed-by: Andreas Dilger Reviewed-by: Max Wang Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/obdclass/obd_config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 32528d8..f5ddaef 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -2085,14 +2085,11 @@ int class_config_yaml_output(struct llog_rec_hdr *rec, char *buf, int size, char *end = buf + size; int rc = 0, i; struct lcfg_type_data *ldata; - int swab = 0; LASSERT(rec->lrh_type == OBD_CFG_REC); - if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION)) { + if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION)) lustre_swab_lustre_cfg(lcfg); - swab = 1; - } rc = lustre_cfg_sanity_check(lcfg, rec->lrh_len); if (rc < 0) -- 1.8.3.1