From: Timothy Day Date: Mon, 13 May 2024 03:39:08 +0000 (+0000) Subject: LU-16518 lnet: fix incorrectly initialized variables X-Git-Tag: 2.15.64~159 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=134e325d8f97a39fa2e063f6162c45cf6677f3cc;p=fs%2Flustre-release.git LU-16518 lnet: fix incorrectly initialized variables Clang 12 complained about an uninitialized 'off' in brw_test.c, fixed by removing the dual declaration. Also, init 'rc' in yaml_import_global_settings(). Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I893149110120975c91839e73241b311a53c6e195 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55084 Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lnet/selftest/brw_test.c b/lnet/selftest/brw_test.c index 6577200..ab9d64b 100644 --- a/lnet/selftest/brw_test.c +++ b/lnet/selftest/brw_test.c @@ -273,7 +273,6 @@ brw_client_prep_rpc(struct sfw_test_unit *tsu, struct lnet_process_id dest, } else { struct test_bulk_req_v1 *breq = &tsi->tsi_u.bulk_v1; - int off; /* I should never get this step if it's unknown feature * because make_session will reject unknown feature */ diff --git a/lnet/utils/lnetctl.c b/lnet/utils/lnetctl.c index 02ba1ba..43b4d09 100644 --- a/lnet/utils/lnetctl.c +++ b/lnet/utils/lnetctl.c @@ -3888,7 +3888,7 @@ static int yaml_import_global_settings(char *key, unsigned long value, char cmd, struct cYAML *show_rc, struct cYAML *err_rc) { - int rc; + int rc = 0; if (strcmp("numa_range", key) == 0) { if (cmd == 'a' || cmd == 'd') {