Whamcloud - gitweb
LU-16518 obdclass: fix unused-but-set-variable warnings 79/58179/2
authorTimothy Day <timday@amazon.com>
Mon, 24 Feb 2025 01:50:28 +0000 (20:50 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:08:21 +0000 (08:08 +0000)
Remove swab variable in class_config_yaml_output()
that is not being used.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I0db780c98fe34cef91988fc3f8c2ccac9481de2c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58179
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/obdclass/obd_config.c

index 32528d8..f5ddaef 100644 (file)
@@ -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)