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 8, 2022
1 parent 555e79d commit 7205a8a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 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
6 changes: 3 additions & 3 deletions test/dt_arith.c
Original file line number Diff line number Diff line change
Expand Up @@ -2698,18 +2698,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 && H5_SIZEOF_LONG_DOUBLE != 0
}
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
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 7205a8a

Please sign in to comment.