From b68988d2d21c57ca02c054272aec01ad86b67ea7 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 20 Jul 2023 08:57:54 -0400 Subject: [PATCH] Fixed some -Wunused-variable warnings and one Wsometimes-uninitialized warning (#3260) --- examples/ph5_filtered_writes.c | 2 -- examples/ph5_filtered_writes_no_sel.c | 1 - testpar/t_vfd.c | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/ph5_filtered_writes.c b/examples/ph5_filtered_writes.c index f5c1169521d..104704a238a 100644 --- a/examples/ph5_filtered_writes.c +++ b/examples/ph5_filtered_writes.c @@ -125,7 +125,6 @@ write_dataset_no_overlap(hid_t file_id, hid_t dxpl_id) hsize_t start[EXAMPLE_DSET_DIMS]; hsize_t stride[EXAMPLE_DSET_DIMS]; hsize_t count[EXAMPLE_DSET_DIMS]; - size_t i, j; hid_t dset_id = H5I_INVALID_HID; hid_t dcpl_id = H5I_INVALID_HID; hid_t file_dataspace = H5I_INVALID_HID; @@ -244,7 +243,6 @@ write_dataset_overlap(hid_t file_id, hid_t dxpl_id) hsize_t start[EXAMPLE_DSET_DIMS]; hsize_t stride[EXAMPLE_DSET_DIMS]; hsize_t count[EXAMPLE_DSET_DIMS]; - size_t i, j; hid_t dset_id = H5I_INVALID_HID; hid_t dcpl_id = H5I_INVALID_HID; hid_t file_dataspace = H5I_INVALID_HID; diff --git a/examples/ph5_filtered_writes_no_sel.c b/examples/ph5_filtered_writes_no_sel.c index 05367d70710..a4d9e169c36 100644 --- a/examples/ph5_filtered_writes_no_sel.c +++ b/examples/ph5_filtered_writes_no_sel.c @@ -126,7 +126,6 @@ write_dataset_some_no_sel(hid_t file_id, hid_t dxpl_id) hsize_t stride[EXAMPLE_DSET_DIMS]; hsize_t count[EXAMPLE_DSET_DIMS]; hbool_t no_selection; - size_t i, j; hid_t dset_id = H5I_INVALID_HID; hid_t dcpl_id = H5I_INVALID_HID; hid_t file_dataspace = H5I_INVALID_HID; diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c index 6e6329c050b..827faf4cd31 100644 --- a/testpar/t_vfd.c +++ b/testpar/t_vfd.c @@ -4086,7 +4086,7 @@ main(int argc, char **argv) int provided = 0; #endif int mpi_size; - int mpi_rank; + int mpi_rank = 0; #ifdef H5_HAVE_SUBFILING_VFD if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) {