Whamcloud - gitweb
LU-16518 lnet: fix incorrectly initialized variables 84/55084/2
authorTimothy Day <timday@amazon.com>
Mon, 13 May 2024 03:39:08 +0000 (03:39 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 04:50:53 +0000 (04:50 +0000)
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 <timday@amazon.com>
Change-Id: I893149110120975c91839e73241b311a53c6e195
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55084
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.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>
lnet/selftest/brw_test.c
lnet/utils/lnetctl.c

index 6577200..ab9d64b 100644 (file)
@@ -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 */
index 02ba1ba..43b4d09 100644 (file)
@@ -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') {