Skip to content

Commit

Permalink
Warnings fixes (HDFGroup#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF committed May 2, 2022
1 parent 1e34f1d commit c4d440a
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
10 changes: 6 additions & 4 deletions src/H5Dmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3467,8 +3467,9 @@ H5D__mpio_redistribute_shared_chunks(H5D_filtered_collective_io_info_t *chunk_li
static herr_t
H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chunk_list,
size_t *num_chunks_assigned_map, hbool_t all_ranks_involved,
const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
int mpi_rank, int mpi_size)
const H5D_io_info_t * io_info,
const H5D_chunk_map_t H5_ATTR_NDEBUG_UNUSED *fm, int mpi_rank,
int mpi_size)
{
MPI_Datatype struct_type;
MPI_Datatype packed_type;
Expand Down Expand Up @@ -3797,7 +3798,8 @@ H5D__mpio_redistribute_shared_chunks_int(H5D_filtered_collective_io_info_t *chun
static herr_t
H5D__mpio_share_chunk_modification_data(H5D_filtered_collective_io_info_t *chunk_list,
size_t *chunk_list_num_entries, H5D_io_info_t *io_info,
const H5D_type_info_t *type_info, int mpi_rank, int mpi_size,
const H5D_type_info_t *type_info, int mpi_rank,
int H5_ATTR_NDEBUG_UNUSED mpi_size,
H5D_filtered_collective_io_info_t **chunk_hash_table,
unsigned char ***chunk_msg_bufs, int *chunk_msg_bufs_len)
{
Expand Down Expand Up @@ -4547,7 +4549,7 @@ H5D__mpio_collective_filtered_chunk_update(H5D_filtered_collective_io_info_t *ch
H5D_filtered_collective_io_info_t *chunk_hash_table,
unsigned char **chunk_msg_bufs, int chunk_msg_bufs_len,
const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
int mpi_rank, int mpi_size)
int H5_ATTR_NDEBUG_UNUSED mpi_rank, int mpi_size)
{
H5D_fill_buf_info_t fb_info;
H5D_chunk_info_t * chunk_info = NULL;
Expand Down
6 changes: 4 additions & 2 deletions src/H5FD.c
Original file line number Diff line number Diff line change
Expand Up @@ -1746,8 +1746,10 @@ H5FDget_vfd_handle(H5FD_t *file, hid_t fapl_id, void **file_handle)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")

done:
if (FAIL == ret_value)
*file_handle = NULL;
if (FAIL == ret_value) {
if (file_handle)
*file_handle = NULL;
}

FUNC_LEAVE_API(ret_value)
} /* end H5FDget_vfd_handle() */
Expand Down
4 changes: 2 additions & 2 deletions src/H5Tref.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ H5T__ref_mem_read(H5VL_object_t H5_ATTR_UNUSED *src_file, const void *src_buf, s
*/
static herr_t
H5T__ref_mem_write(H5VL_object_t *src_file, const void *src_buf, size_t src_size, H5R_type_t src_type,
H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, size_t dst_size,
void H5_ATTR_UNUSED *bg_buf)
H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf,
size_t H5_ATTR_NDEBUG_UNUSED dst_size, void H5_ATTR_UNUSED *bg_buf)
{
H5F_t * src_f = NULL;
hid_t file_id = H5I_INVALID_HID;
Expand Down
2 changes: 1 addition & 1 deletion test/cache_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -7510,7 +7510,7 @@ get_free_sections_test(hbool_t single_file_vfd)
*-------------------------------------------------------------------------
*/
static unsigned
evict_on_close_test(hbool_t single_file_vfd)
evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd)
{
#ifndef H5_HAVE_PARALLEL
const char *fcn_name = "evict_on_close_test()";
Expand Down
6 changes: 3 additions & 3 deletions test/dt_arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -2694,18 +2694,18 @@ my_isnan(dtype_t type, void *val)
if (FLT_FLOAT == type) {
float x = 0.0;
HDmemcpy(&x, val, sizeof(float));
retval = (x != x);
retval = !H5_FLT_ABS_EQUAL(x, x);
}
else if (FLT_DOUBLE == type) {
double x = 0.0;
HDmemcpy(&x, val, sizeof(double));
retval = (x != x);
retval = !H5_DBL_ABS_EQUAL(x, x);
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else if (FLT_LDOUBLE == type) {
long double x = 0.0;
HDmemcpy(&x, val, sizeof(long double));
retval = (x != x);
retval = !H5_LDBL_ABS_EQUAL(x, x);
#endif
}
else {
Expand Down
4 changes: 2 additions & 2 deletions testpar/t_bigio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,14 +1151,14 @@ single_rank_independent_io(void)
VRFY_G((mspace_id >= 0), "H5Screate_simple mspace_id succeeded");

/* Write data */
H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
ret = H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
VRFY_G((ret >= 0), "H5Dwrite succeeded");

/* Wipe buffer */
HDmemset(data, 0, LARGE_DIM * sizeof(int));

/* Read data back */
H5Dread(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
ret = H5Dread(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
VRFY_G((ret >= 0), "H5Dread succeeded");

/* Verify data */
Expand Down
6 changes: 4 additions & 2 deletions testpar/t_filters_parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7857,8 +7857,10 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t
* edge chunk and writes to just a portion of the edge chunk.
*/
static void
test_edge_chunks_partial_write(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id, hid_t dcpl_id,
hid_t dxpl_id)
test_edge_chunks_partial_write(const char H5_ATTR_PARALLEL_UNUSED * parent_group,
H5Z_filter_t H5_ATTR_PARALLEL_UNUSED filter_id,
hid_t H5_ATTR_PARALLEL_UNUSED fapl_id, hid_t H5_ATTR_PARALLEL_UNUSED dcpl_id,
hid_t H5_ATTR_PARALLEL_UNUSED dxpl_id)
{
/* TODO */
}
Expand Down
2 changes: 1 addition & 1 deletion tools/src/h5diff/ph5diff_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
HDexit(0);
HDexit(status);
}

0 comments on commit c4d440a

Please sign in to comment.