From 33bb1970b8b010ebb503aaf7def46bafd87d9d9b Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Fri, 9 Feb 2024 11:05:54 -0600 Subject: [PATCH] Fix build issue and some warnings in H5_api_dataset_test.c (#3998) --- test/API/H5_api_dataset_test.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c index b2344a5a00e..f02445d7a58 100644 --- a/test/API/H5_api_dataset_test.c +++ b/test/API/H5_api_dataset_test.c @@ -2049,18 +2049,11 @@ test_create_dataset_array_types(void) } size_t -filter(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, const unsigned int H5_ATTR_UNUSED cd_values[], - size_t nbytes, size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) +filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED cd_values[], size_t nbytes, size_t H5_ATTR_UNUSED *buf_size, + void H5_ATTR_UNUSED **buf) { - buf_size = 0; - - if (flags & H5Z_FLAG_REVERSE) { - /* No-op */ - } - else { - /* No-op */ - } - + *buf_size = 0; return nbytes; } @@ -2082,7 +2075,7 @@ test_create_dataset_creation_properties(void) void *read_buf = NULL; unsigned int filter_params[DATASET_CREATION_PROPERTIES_TEST_UD_FILTER_NUM_PARAMS] = {1, 2, 3}; unsigned int filter_params_out[DATASET_CREATION_PROPERTIES_TEST_UD_FILTER_NUM_PARAMS]; - char ud_filter_name[strlen(DATASET_CREATION_PROPERTIES_TEST_UD_FILTER_NAME)]; + char ud_filter_name[sizeof(DATASET_CREATION_PROPERTIES_TEST_UD_FILTER_NAME)]; int nfilters = 0; H5Z_filter_t retrieved_filter_id = H5I_INVALID_HID; size_t num_filter_params = DATASET_CREATION_PROPERTIES_TEST_UD_FILTER_NUM_PARAMS;