From ff7da7478bd91b6da2eececdc1c490b1808669c2 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 20 Sep 2023 16:16:29 -0500 Subject: [PATCH] warning clean-up: replaced assert with GOTO_ERROR --- src/H5FDsubfiling/H5subfiling_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c index 50ca6afcb31..0362ab40d89 100644 --- a/src/H5FDsubfiling/H5subfiling_common.c +++ b/src/H5FDsubfiling/H5subfiling_common.c @@ -1365,7 +1365,8 @@ init_app_layout(sf_topology_t *app_topology, MPI_Comm comm, MPI_Comm node_comm) if (app_layout->layout[i].node_local_rank == 0) app_layout->node_count++; - assert(app_layout->node_count > 0); + if (app_layout->node_count <= 0) + H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "node count less than or equal to zero"); if (NULL == (app_layout->node_ranks = malloc((size_t)app_layout->node_count * sizeof(*app_layout->node_ranks))))