Skip to content

Commit f8c9460

Browse files
committed
coll_base_allgather: ensure to initialize variables
Without these changes, gcc 14's static analyzer emitted warnings. Signed-off-by: Jeff Squyres <[email protected]>
1 parent a601c9a commit f8c9460

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/coll/base/coll_base_allgather.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* reserved.
1515
* Copyright (c) 2014-2016 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
17+
* Copyright (c) 2024 Jeffrey M. Squyres. All rights reserved.
1718
* $COPYRIGHT$
1819
*
1920
* Additional copyrights may follow
@@ -776,7 +777,7 @@ int ompi_coll_base_allgather_intra_k_bruck(const void *sbuf, size_t scount,
776777
int recvcount, distance;
777778
ptrdiff_t rlb, rextent;
778779
ptrdiff_t rsize, rgap = 0;
779-
ompi_request_t **reqs;
780+
ompi_request_t **reqs = NULL;
780781
int num_reqs, max_reqs = 0;
781782

782783
char *tmpsend = NULL;
@@ -937,7 +938,7 @@ int ompi_coll_base_allgather_direct_messaging(const void *sbuf, size_t scount,
937938
int line = -1, rank, comm_size, err = MPI_SUCCESS;
938939
ptrdiff_t rlb, rextent;
939940
ptrdiff_t incr;
940-
ompi_request_t **reqs;
941+
ompi_request_t **reqs = NULL;
941942
int max_reqs = 0, reqs_needed = 0;
942943
int peer_rank = 0;
943944

0 commit comments

Comments
 (0)