diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 65949b64df3..03e49277613 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -398,13 +398,13 @@ test_tconv(H5File &file) /* This message derives from H5Z */ const H5Z_class2_t H5Z_BOGUS[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version number */ - H5Z_FILTER_BOGUS, /* Filter id number */ - 1, 1, /* Encode and decode enabled */ - "bogus", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)filter_bogus, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version number */ + H5Z_FILTER_BOGUS, /* Filter id number */ + 1, 1, /* Encode and decode enabled */ + "bogus", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus, /* The actual filter function */ }}; /*------------------------------------------------------------------------- diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index 1ded033fb73..2df88b2714b 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -49,20 +49,18 @@ static herr_t test_filter_internal(hid_t fid, const char *name, hid_t dcpl, /* Temporary filter IDs used for testing */ const int H5Z_FILTER_BOGUS = 305; -#if 0 // H5_ATTR_UNUSED variables caused warning, so duplicated below with NULL instead -static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, - const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); -#endif -static size_t filter_bogus(size_t nbytes); +static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf); + /* This message derives from H5Z */ const H5Z_class2_t H5Z_BOGUS[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_BOGUS, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "bogus", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)filter_bogus, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_BOGUS, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "bogus", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + filter_bogus, /* The actual filter function */ }}; /*------------------------------------------------------------------------- @@ -79,13 +77,15 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{ *------------------------------------------------------------------------- */ static size_t -#if 0 // H5_ATTR_UNUSED variables caused warning, so duplicated below with NULL instead -filter_bogus(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) -#endif -filter_bogus(size_t nbytes) +filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) { + (void)flags; + (void)cd_nelmts; + (void)cd_values; + (void)buf_size; + (void)buf; + return nbytes; } diff --git a/examples/h5_vds.c b/examples/h5_vds.c index 6bef06fd638..e0362041504 100644 --- a/examples/h5_vds.c +++ b/examples/h5_vds.c @@ -60,7 +60,7 @@ main(void) hsize_t start_out[2], stride_out[2], count_out[2], block_out[2]; int wdata[DIM0], /* Write buffer for source dataset */ rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */ - i, j, k, l; + i, j, k, l, block_inc; int fill_value = -1; /* Fill value for VDS */ H5D_layout_t layout; /* Storage layout */ size_t num_map; /* Number of mappings */ @@ -178,13 +178,14 @@ main(void) buf = (hsize_t *)malloc(sizeof(hsize_t) * 2 * RANK2 * nblocks); status = H5Sget_select_hyper_blocklist(vspace, (hsize_t)0, nblocks, buf); for (l = 0; l < nblocks; l++) { + block_inc = 2 * RANK2 * l; printf("("); for (k = 0; k < RANK2 - 1; k++) - printf("%d,", (int)buf[k]); - printf("%d ) - (", (int)buf[k]); + printf("%d,", (int)buf[block_inc + k]); + printf("%d) - (", (int)buf[block_inc + k]); for (k = 0; k < RANK2 - 1; k++) - printf("%d,", (int)buf[RANK2 + k]); - printf("%d)\n", (int)buf[RANK2 + k]); + printf("%d,", (int)buf[block_inc + RANK2 + k]); + printf("%d)\n", (int)buf[block_inc + RANK2 + k]); } /* We also can use new APIs to get start, stride, count and block */ if (H5Sis_regular_hyperslab(vspace)) { diff --git a/src/H5.c b/src/H5.c index 17ace7baf91..35bfdafc540 100644 --- a/src/H5.c +++ b/src/H5.c @@ -757,9 +757,6 @@ H5__debug_mask(const char *s) s++; } /* end if-else */ } /* end while */ - - return; - } /* end H5__debug_mask() */ #ifdef H5_HAVE_PARALLEL diff --git a/src/H5C.c b/src/H5C.c index 8527af37c5c..646b603bd9c 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -689,9 +689,6 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, HDfprintf(stdout, "%sAuto cache resize -- unknown status code.\n", cache_ptr->prefix); break; } - - return; - } /* H5C_def_auto_resize_rpt_fcn() */ /*------------------------------------------------------------------------- diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 478cc1dfa1d..e59012ce8cc 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -832,8 +832,6 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr) #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ #endif /* H5C_COLLECT_CACHE_STATS */ - - return; } /* H5C_stats__reset() */ /*------------------------------------------------------------------------- diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index 98bbf0b99e8..bad89ae51cb 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -1234,10 +1234,10 @@ H5O__alloc_find_best_null(const H5O_t *oh, size_t size, size_t *mesg_idx) /* Keep first one found */ if (found_null < 0) found_null = (ssize_t)idx; - else - /* Check for better fit */ - if (oh->mesg[idx].raw_size < oh->mesg[found_null].raw_size) + /* Check for better fit */ + else if (oh->mesg[idx].raw_size < oh->mesg[found_null].raw_size) { found_null = (ssize_t)idx; + } else { /* If they are the same size, choose the one in the earliest chunk */ if (oh->mesg[idx].raw_size == oh->mesg[found_null].raw_size) { diff --git a/src/H5Oint.c b/src/H5Oint.c index 2148dbe6772..18b2db05f3a 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -448,12 +448,16 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init #if H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T if (size_hint > 4294967295UL) oh->flags |= H5O_HDR_CHUNK0_8; - else -#endif /* H5_SIZEOF_SIZE_T > H5_SIZEOF_INT32_T */ - if (size_hint > 65535) + else if (size_hint > 65535) oh->flags |= H5O_HDR_CHUNK0_4; else if (size_hint > 255) oh->flags |= H5O_HDR_CHUNK0_2; +#else + if (size_hint > 65535) + oh->flags |= H5O_HDR_CHUNK0_4; + else if (size_hint > 255) + oh->flags |= H5O_HDR_CHUNK0_2; +#endif } else { /* Reset unused time fields */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index d79cfa19563..9890c139735 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -198,7 +198,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Set the fill value parameter in cd_values[] for unsigned integer type */ #define H5Z_scaleoffset_set_filval_1(type, dcpl_plist, dt, cd_values, need_convert) \ - { \ + do { \ type fill_val; \ \ /* Get dataset fill value */ \ @@ -209,11 +209,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ \ H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \ - } + } while (0) /* Set the fill value parameter in cd_values[] for signed integer type */ #define H5Z_scaleoffset_set_filval_2(type, dcpl_plist, dt, cd_values, need_convert) \ - { \ + do { \ type fill_val; \ \ /* Get dataset fill value */ \ @@ -224,11 +224,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ \ H5Z_scaleoffset_save_filval(unsigned type, cd_values, fill_val) \ - } + } while (0) /* Set the fill value parameter in cd_values[] for character integer type */ #define H5Z_scaleoffset_set_filval_3(type, dcpl_plist, dt, cd_values, need_convert) \ - { \ + do { \ type fill_val; \ \ /* Get dataset fill value */ \ @@ -237,11 +237,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ \ /* Store the fill value as the last entry in cd_values[] */ \ (cd_values)[H5Z_SCALEOFFSET_PARM_FILVAL] = (unsigned)((unsigned char)fill_val); \ - } + } while (0) /* Set the fill value parameter in cd_values[] for floating-point type */ #define H5Z_scaleoffset_set_filval_4(type, dcpl_plist, dt, cd_values, need_convert) \ - { \ + do { \ type fill_val; \ \ /* Get dataset fill value */ \ @@ -252,7 +252,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ H5Z__scaleoffset_convert(&fill_val, 1, sizeof(type)); \ \ H5Z_scaleoffset_save_filval(type, cd_values, fill_val) \ - } + } while (0) /* Get the fill value for integer type */ #define H5Z_scaleoffset_get_filval_1(type, cd_values, fill_val) \ @@ -451,7 +451,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Precompress for unsigned integer type */ #define H5Z_scaleoffset_precompress_1(type, data, d_nelmts, filavail, cd_values, minbits, minval) \ - { \ + do { \ type * buf = (type *)data, min = 0, max = 0, span, filval = 0; \ unsigned i; \ \ @@ -484,11 +484,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ for (i = 0; i < d_nelmts; i++) buf[i] = (type)(buf[i] - min); \ } \ *minval = min; \ - } + } while (0) /* Precompress for signed integer type */ #define H5Z_scaleoffset_precompress_2(type, data, d_nelmts, filavail, cd_values, minbits, minval) \ - { \ + do { \ type * buf = (type *)data, min = 0, max = 0, filval = 0; \ unsigned type span; \ unsigned i; \ @@ -522,7 +522,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ for (i = 0; i < d_nelmts; i++) buf[i] = (type)(buf[i] - min); \ } \ *minval = (unsigned long long)min; \ - } + } while (0) /* Modify values of data in precompression if fill value defined for floating-point type */ #define H5Z_scaleoffset_modify_1(i, type, pow_fun, abs_fun, lround_fun, llround_fun, buf, d_nelmts, filval, \ @@ -596,7 +596,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Precompress for floating-point type using variable-minimum-bits method */ #define H5Z_scaleoffset_precompress_3(type, pow_fun, abs_fun, round_fun, lround_fun, llround_fun, data, \ d_nelmts, filavail, cd_values, minbits, minval, D_val) \ - { \ + do { \ type * buf = (type *)data, min = 0, max = 0, filval = 0; \ unsigned long long span; \ unsigned i; \ @@ -626,11 +626,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ D_val) \ } \ H5Z_scaleoffset_save_min(i, type, minval, min) \ - } + } while (0) /* Postdecompress for unsigned integer type */ #define H5Z_scaleoffset_postdecompress_1(type, data, d_nelmts, filavail, cd_values, minbits, minval) \ - { \ + do { \ type * buf = (type *)data, filval = 0; \ unsigned i; \ \ @@ -641,11 +641,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ else /* fill value undefined */ \ for (i = 0; i < d_nelmts; i++) \ buf[i] = (type)(buf[i] + (type)(minval)); \ - } + } while (0) /* Postdecompress for signed integer type */ #define H5Z_scaleoffset_postdecompress_2(type, data, d_nelmts, filavail, cd_values, minbits, minval) \ - { \ + do { \ type * buf = (type *)data, filval = 0; \ unsigned i; \ \ @@ -657,7 +657,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ else /* fill value undefined */ \ for (i = 0; i < d_nelmts; i++) \ buf[i] = (type)(buf[i] + (type)(minval)); \ - } + } while (0) /* Retrive minimum value of floating-point type */ #define H5Z_scaleoffset_get_min(type, minval, min) \ @@ -721,7 +721,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Postdecompress for floating-point type using variable-minimum-bits method */ #define H5Z_scaleoffset_postdecompress_3(type, pow_fun, data, d_nelmts, filavail, cd_values, minbits, \ minval, D_val) \ - { \ + do { \ type * buf = (type *)data, filval = 0, min = 0; \ unsigned i; \ \ @@ -734,7 +734,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ } \ else /* fill value undefined */ \ H5Z_scaleoffset_modify_4(i, type, pow_fun, buf, d_nelmts, min, D_val) \ - } + } while (0) /*------------------------------------------------------------------------- * Function: H5Z__can_apply_scaleoffset @@ -884,35 +884,32 @@ H5Z__scaleoffset_set_parms_fillval(H5P_genplist_t *dcpl_plist, H5T_t *type, enum FUNC_ENTER_STATIC if (scale_type == t_uchar) - H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_ushort) - H5Z_scaleoffset_set_filval_1(unsigned short, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_uint) - H5Z_scaleoffset_set_filval_1(unsigned int, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_ulong) - H5Z_scaleoffset_set_filval_1(unsigned long, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_ulong_long) - H5Z_scaleoffset_set_filval_1(unsigned long long, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_schar) - H5Z_scaleoffset_set_filval_3(signed char, dcpl_plist, type, cd_values, - need_convertd) else if (scale_type == t_short) - H5Z_scaleoffset_set_filval_2(short, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_int) - H5Z_scaleoffset_set_filval_2(int, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_long) - H5Z_scaleoffset_set_filval_2(long, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == - t_long_long) - H5Z_scaleoffset_set_filval_2( - long long, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_float) - H5Z_scaleoffset_set_filval_4( - float, dcpl_plist, type, cd_values, - need_convert) else if (scale_type == t_double) - H5Z_scaleoffset_set_filval_4(double, dcpl_plist, type, - cd_values, need_convert) - - done : FUNC_LEAVE_NOAPI(ret_value) + H5Z_scaleoffset_set_filval_3(unsigned char, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_ushort) + H5Z_scaleoffset_set_filval_1(unsigned short, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_uint) + H5Z_scaleoffset_set_filval_1(unsigned int, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_ulong) + H5Z_scaleoffset_set_filval_1(unsigned long, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_ulong_long) + H5Z_scaleoffset_set_filval_1(unsigned long long, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_schar) + H5Z_scaleoffset_set_filval_3(signed char, dcpl_plist, type, cd_values, need_convertd); + else if (scale_type == t_short) + H5Z_scaleoffset_set_filval_2(short, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_int) + H5Z_scaleoffset_set_filval_2(int, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_long) + H5Z_scaleoffset_set_filval_2(long, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_long_long) + H5Z_scaleoffset_set_filval_2(long long, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_float) + H5Z_scaleoffset_set_filval_4(float, dcpl_plist, type, cd_values, need_convert); + else if (scale_type == t_double) + H5Z_scaleoffset_set_filval_4(double, dcpl_plist, type, cd_values, need_convert); + +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z__scaleoffset_set_parms_fillval() */ /*------------------------------------------------------------------------- @@ -1443,76 +1440,75 @@ H5Z__scaleoffset_precompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleoffs const unsigned cd_values[], uint32_t *minbits, unsigned long long *minval) { if (type == t_uchar) - H5Z_scaleoffset_precompress_1(unsigned char, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_ushort) - H5Z_scaleoffset_precompress_1(unsigned short, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_uint) - H5Z_scaleoffset_precompress_1(unsigned int, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_ulong) - H5Z_scaleoffset_precompress_1(unsigned long, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_ulong_long) - H5Z_scaleoffset_precompress_1(unsigned long long, data, d_nelmts, filavail, cd_values, - minbits, minval) else if (type == t_schar) - { - signed char * buf = (signed char *)data, min = 0, max = 0, filval = 0; - unsigned char span; - unsigned i; - - if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ - H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval); - if (*minbits == - H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ - H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, - min) if ((unsigned char)(max - min) > - (unsigned char)(~(unsigned char)0 - 2)) - { - *minbits = sizeof(signed char) * 8; - return; - } - span = (unsigned char)(max - min + 1); - *minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); + H5Z_scaleoffset_precompress_1(unsigned char, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ushort) + H5Z_scaleoffset_precompress_1(unsigned short, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_uint) + H5Z_scaleoffset_precompress_1(unsigned int, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ulong) + H5Z_scaleoffset_precompress_1(unsigned long, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ulong_long) + H5Z_scaleoffset_precompress_1(unsigned long long, data, d_nelmts, filavail, cd_values, minbits, + minval); + else if (type == t_schar) { + signed char * buf = (signed char *)data, min = 0, max = 0, filval = 0; + unsigned char span; + unsigned i; + + if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ + H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval); + if (*minbits == + H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ + H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, + min) if ((unsigned char)(max - min) > + (unsigned char)(~(unsigned char)0 - 2)) + { + *minbits = sizeof(signed char) * 8; + return; } - else /* minbits already set, only calculate min */ - H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, - min) if (*minbits != - sizeof(signed char) * - 8) /* change values if minbits != full precision */ - for (i = 0; i < d_nelmts; i++) buf[i] = - (signed char)((buf[i] == filval) ? (((unsigned char)1 << *minbits) - 1) - : (buf[i] - min)); + span = (unsigned char)(max - min + 1); + *minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); } - else { /* fill value undefined */ - if (*minbits == - H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ - H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, - min) if ((unsigned char)(max - min) > - (unsigned char)(~(unsigned char)0 - 2)) - { - *minbits = sizeof(signed char) * 8; - *minval = (unsigned long long)min; - return; - } - span = (unsigned char)(max - min + 1); - *minbits = H5Z__scaleoffset_log2((unsigned long long)span); + else /* minbits already set, only calculate min */ + H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, + min) if (*minbits != + sizeof(signed char) * + 8) /* change values if minbits != full precision */ + for (i = 0; i < d_nelmts; i++) buf[i] = + (signed char)((buf[i] == filval) ? (((unsigned char)1 << *minbits) - 1) + : (buf[i] - min)); + } + else { /* fill value undefined */ + if (*minbits == + H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ + H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, + min) if ((unsigned char)(max - min) > + (unsigned char)(~(unsigned char)0 - 2)) + { + *minbits = sizeof(signed char) * 8; + *minval = (unsigned long long)min; + return; } - else /* minbits already set, only calculate min */ - H5Z_scaleoffset_min_2(i, d_nelmts, buf, - min) if (*minbits != - sizeof(signed char) * - 8) /* change values if minbits != full precision */ - for (i = 0; i < d_nelmts; i++) buf[i] = (signed char)(buf[i] - min); + span = (unsigned char)(max - min + 1); + *minbits = H5Z__scaleoffset_log2((unsigned long long)span); } - *minval = (unsigned long long)min; + else /* minbits already set, only calculate min */ + H5Z_scaleoffset_min_2(i, d_nelmts, buf, + min) if (*minbits != + sizeof(signed char) * + 8) /* change values if minbits != full precision */ + for (i = 0; i < d_nelmts; i++) buf[i] = (signed char)(buf[i] - min); } + *minval = (unsigned long long)min; + } else if (type == t_short) - H5Z_scaleoffset_precompress_2(short, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_int) - H5Z_scaleoffset_precompress_2(int, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_long) - H5Z_scaleoffset_precompress_2(long, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_long_long) - H5Z_scaleoffset_precompress_2(long long, data, d_nelmts, filavail, cd_values, minbits, - minval) + H5Z_scaleoffset_precompress_2(short, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_int) + H5Z_scaleoffset_precompress_2(int, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_long) + H5Z_scaleoffset_precompress_2(long, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_long_long) + H5Z_scaleoffset_precompress_2(long long, data, d_nelmts, filavail, cd_values, minbits, minval); } /* postdecompress for integer type */ @@ -1524,39 +1520,38 @@ H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleo long long sminval = *(long long *)&minval; /* for signed integer types */ if (type == t_uchar) - H5Z_scaleoffset_postdecompress_1(unsigned char, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_ushort) - H5Z_scaleoffset_postdecompress_1(unsigned short, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_uint) - H5Z_scaleoffset_postdecompress_1(unsigned int, data, d_nelmts, filavail, cd_values, minbits, - minval) else if (type == t_ulong) - H5Z_scaleoffset_postdecompress_1(unsigned long, data, d_nelmts, filavail, cd_values, - minbits, minval) else if (type == t_ulong_long) - H5Z_scaleoffset_postdecompress_1(unsigned long long, data, d_nelmts, filavail, - cd_values, minbits, minval) else if (type == t_schar) - { - signed char *buf = (signed char *)data, filval = 0; - unsigned i; - - if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ - H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval) for (i = 0; i < d_nelmts; i++) - buf[i] = - (signed char)((buf[i] == (((unsigned char)1 << minbits) - 1)) ? filval - : (buf[i] + sminval)); - } - else /* fill value undefined */ - for (i = 0; i < d_nelmts; i++) - buf[i] = (signed char)(buf[i] + sminval); + H5Z_scaleoffset_postdecompress_1(unsigned char, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ushort) + H5Z_scaleoffset_postdecompress_1(unsigned short, data, d_nelmts, filavail, cd_values, minbits, + minval); + else if (type == t_uint) + H5Z_scaleoffset_postdecompress_1(unsigned int, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ulong) + H5Z_scaleoffset_postdecompress_1(unsigned long, data, d_nelmts, filavail, cd_values, minbits, minval); + else if (type == t_ulong_long) + H5Z_scaleoffset_postdecompress_1(unsigned long long, data, d_nelmts, filavail, cd_values, minbits, + minval); + else if (type == t_schar) { + signed char *buf = (signed char *)data, filval = 0; + unsigned i; + + if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ + H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval) for (i = 0; i < d_nelmts; + i++) buf[i] = + (signed char)((buf[i] == (((unsigned char)1 << minbits) - 1)) ? filval : (buf[i] + sminval)); } + else /* fill value undefined */ + for (i = 0; i < d_nelmts; i++) + buf[i] = (signed char)(buf[i] + sminval); + } else if (type == t_short) - H5Z_scaleoffset_postdecompress_2(short, data, d_nelmts, filavail, cd_values, minbits, - sminval) else if (type == t_int) - H5Z_scaleoffset_postdecompress_2(int, data, d_nelmts, filavail, cd_values, minbits, - sminval) else if (type == t_long) - H5Z_scaleoffset_postdecompress_2(long, data, d_nelmts, filavail, cd_values, minbits, - sminval) else if (type == t_long_long) - H5Z_scaleoffset_postdecompress_2(long long, data, d_nelmts, filavail, cd_values, minbits, - sminval) + H5Z_scaleoffset_postdecompress_2(short, data, d_nelmts, filavail, cd_values, minbits, sminval); + else if (type == t_int) + H5Z_scaleoffset_postdecompress_2(int, data, d_nelmts, filavail, cd_values, minbits, sminval); + else if (type == t_long) + H5Z_scaleoffset_postdecompress_2(long, data, d_nelmts, filavail, cd_values, minbits, sminval); + else if (type == t_long_long) + H5Z_scaleoffset_postdecompress_2(long long, data, d_nelmts, filavail, cd_values, minbits, sminval); } /* precompress for floating-point type, variable-minimum-bits method @@ -1572,11 +1567,13 @@ H5Z__scaleoffset_precompress_fd(void *data, unsigned d_nelmts, enum H5Z_scaleoff if (type == t_float) H5Z_scaleoffset_precompress_3(float, HDpowf, HDfabsf, HDroundf, HDlroundf, HDllroundf, data, d_nelmts, - filavail, cd_values, minbits, minval, D_val) else if (type == t_double) - H5Z_scaleoffset_precompress_3(double, HDpow, HDfabs, HDround, HDlround, HDllround, data, d_nelmts, - filavail, cd_values, minbits, minval, D_val) + filavail, cd_values, minbits, minval, D_val); + else if (type == t_double) + H5Z_scaleoffset_precompress_3(double, HDpow, HDfabs, HDround, HDlround, HDllround, data, d_nelmts, + filavail, cd_values, minbits, minval, D_val); - done : FUNC_LEAVE_NOAPI(ret_value) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* postdecompress for floating-point type, variable-minimum-bits method @@ -1593,11 +1590,13 @@ H5Z__scaleoffset_postdecompress_fd(void *data, unsigned d_nelmts, enum H5Z_scale if (type == t_float) H5Z_scaleoffset_postdecompress_3(float, HDpowf, data, d_nelmts, filavail, cd_values, minbits, sminval, - D_val) else if (type == t_double) - H5Z_scaleoffset_postdecompress_3(double, HDpow, data, d_nelmts, filavail, cd_values, minbits, - sminval, D_val) + D_val); + else if (type == t_double) + H5Z_scaleoffset_postdecompress_3(double, HDpow, data, d_nelmts, filavail, cd_values, minbits, sminval, + D_val); - done : FUNC_LEAVE_NOAPI(ret_value) +done: + FUNC_LEAVE_NOAPI(ret_value) } static void diff --git a/src/H5private.h b/src/H5private.h index 7863ae2071a..c640b4280e7 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -675,11 +675,6 @@ typedef struct { #ifndef HDacos #define HDacos(X) acos(X) #endif /* HDacos */ -#ifndef HDvasprintf -#ifdef H5_HAVE_VASPRINTF -#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) -#endif /* H5_HAVE_VASPRINTF */ -#endif /* HDvasprintf */ #ifndef HDalarm #ifdef H5_HAVE_ALARM #define HDalarm(N) alarm(N) @@ -1596,6 +1591,13 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); #ifndef HDutime #define HDutime(S, T) utime(S, T) #endif /* HDutime */ +#ifndef HDvasprintf +#ifdef H5_HAVE_VASPRINTF +#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) +#else +H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); +#endif /* H5_HAVE_VASPRINTF */ +#endif /* HDvasprintf */ #ifndef HDva_arg #define HDva_arg(A, T) va_arg(A, T) #endif /* HDva_arg */ diff --git a/src/H5system.c b/src/H5system.c index 2ac3f9340a4..53307a8c1de 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -66,7 +66,7 @@ /* Track whether tzset routine was called */ static hbool_t H5_ntzset = FALSE; -#ifndef HDvasprintf +#ifndef H5_HAVE_VASPRINTF /* HDvasprintf provides vasprintf-like function on targets where it is * unavailable. */ @@ -94,7 +94,7 @@ HDvasprintf(char **bufp, const char *fmt, va_list _ap) } return -1; } -#endif +#endif /* H5_HAVE_VASPRINTF */ /*------------------------------------------------------------------------- * Function: HDstrtoll @@ -737,7 +737,7 @@ Wroundf(float arg) * *------------------------------------------------------------------------- */ -const wchar_t * +wchar_t * H5_get_utf16_str(const char *s) { int nwchars = -1; /* Length of the UTF-16 buffer */ @@ -833,7 +833,7 @@ int Wremove_utf8(const char *path) { wchar_t *wpath = NULL; /* UTF-16 version of the path */ - int ret; + int ret = -1; /* Convert the input UTF-8 path to UTF-16 */ if (NULL == (wpath = H5_get_utf16_str(path))) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index b4b253f0729..8f3947afd34 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -176,9 +176,10 @@ H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...); H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap); H5_DLL int Wnanosleep(const struct timespec *req, struct timespec *rem); H5_DLL herr_t H5_expand_windows_env_vars(char **env_var); -H5_DLL const wchar_t *H5_get_utf16_str(const char *s); -H5_DLL int Wopen_utf8(const char *path, int oflag, ...); -H5_DLL int Wremove_utf8(const char *path); +H5_DLL wchar_t *H5_get_utf16_str(const char *s); +H5_DLL int Wopen_utf8(const char *path, int oflag, ...); +H5_DLL int Wremove_utf8(const char *path); +H5_DLL int H5_get_win32_times(H5_timevals_t *tvs); /* Round functions only needed for VS2012 and earlier. * They are always built to ensure they don't go stale and diff --git a/test/accum.c b/test/accum.c index 1f09fe04851..fd97576e865 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2092,6 +2092,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed); unsigned test_swmr_write_big(hbool_t newest_format) { +#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_UNISTD_H) hid_t fid = -1; /* File ID */ hid_t fapl = -1; /* File access property list */ H5F_t * rf = NULL; /* File pointer */ @@ -2099,26 +2100,16 @@ test_swmr_write_big(hbool_t newest_format) uint8_t *wbuf2 = NULL, *rbuf = NULL; /* Buffers for reading & writing */ uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ -#ifdef H5_HAVE_UNISTD_H - pid_t pid; /* Process ID */ -#endif /* H5_HAVE_UNISTD_H */ - int status; /* Status returned from child process */ - char * driver = NULL; /* VFD string (from env variable) */ - hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + pid_t pid; /* Process ID */ + int status; /* Status returned from child process */ + char * driver = NULL; /* VFD string (from env variable) */ + hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ if (newest_format) TESTING("SWMR write of large metadata: with latest format") else TESTING("SWMR write of large metadata: with non-latest-format") -#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID)) - - SKIPPED(); - HDputs(" Test skipped due to fork or waitpid not defined."); - return 0; - -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ - /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. */ @@ -2296,7 +2287,11 @@ test_swmr_write_big(hbool_t newest_format) return 1; -#endif +#else + SKIPPED(); + HDputs(" Test skipped due to fork, waitpid, or pid_t not defined."); + return 0; +#endif /* defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_UNISTD_H) */ } /* end test_swmr_write_big() */ diff --git a/test/cache.c b/test/cache.c index 17cae891dff..98e914a0dfe 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3210,8 +3210,6 @@ check_flush_cache__empty_cache(H5F_t *file_ptr) "flush with flags = 0x10 failed on empty cache.\n") } - return; - } /* check_flush_cache__empty_cache() */ /*------------------------------------------------------------------------- @@ -4413,8 +4411,6 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } - return; - } /* check_flush_cache__multi_entry() */ /*------------------------------------------------------------------------- @@ -4599,8 +4595,6 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int u++; } - return; - } /* check_flush_cache__multi_entry_test() */ /*------------------------------------------------------------------------- @@ -4794,8 +4788,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i u++; } - return; - } /* check_flush_cache__pe_multi_entry_test() */ /*------------------------------------------------------------------------- @@ -7991,8 +7983,6 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) /* finally finish up with the flush ops eviction test */ check_flush_cache__flush_op_eviction_test(file_ptr); - return; - } /* check_flush_cache__flush_ops() */ /*------------------------------------------------------------------------- @@ -8394,8 +8384,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu i++; } - return; - } /* check_flush_cache__flush_op_test() */ /*------------------------------------------------------------------------- @@ -10546,8 +10534,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr) reset_entries(); } - return; - } /* check_flush_cache__flush_op_eviction_test() */ /*------------------------------------------------------------------------- @@ -12171,8 +12157,6 @@ check_flush_cache__single_entry(H5F_t *file_ptr) } } - return; - } /* check_flush_cache__single_entry() */ /*------------------------------------------------------------------------- @@ -12312,8 +12296,6 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty } } - return; - } /* check_flush_cache__single_entry_test() */ /*------------------------------------------------------------------------- @@ -12489,8 +12471,6 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e } } - return; - } /* check_flush_cache__pinned_single_entry_test() */ /*------------------------------------------------------------------------- @@ -13639,8 +13619,6 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry /* put the entry back where it started from */ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, TRUE); - return; - } /* check_move_entry__run_test() */ /*------------------------------------------------------------------------- @@ -33880,8 +33858,6 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__expunge_dirty_entry_in_flush_test() */ /*------------------------------------------------------------------------- @@ -34240,8 +34216,6 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C_make_space_in_cache() */ /*------------------------------------------------------------------------- @@ -34638,8 +34612,6 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */ /*------------------------------------------------------------------------- @@ -35016,8 +34988,6 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C_flush_invalidate_cache__bucket_scan() */ /*------------------------------------------------------------------------- @@ -35480,8 +35450,6 @@ check_stats__smoke_check_1(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* check_stats__smoke_check_1() */ #endif /* H5C_COLLECT_CACHE_STATS */ @@ -35889,8 +35857,6 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats) } } - return; - } /* takedown_cache() */ /*------------------------------------------------------------------------- diff --git a/test/cache_common.c b/test/cache_common.c index 0d6136e53f6..54b1cc5079d 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -434,8 +434,6 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr) *type_ptr = type; *index_ptr = idx; - return; - } /* addr_to_type_and_index() */ /* Call back functions: */ @@ -1515,8 +1513,6 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb (target_entry_ptr->flush_ops)[i].order_ptr = order_ptr; } - return; - } /* add_flush_op() */ /*------------------------------------------------------------------------- @@ -1586,8 +1582,6 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id (pinned_entry_ptr->pinning_ref_count)++; } - return; - } /* create_pinned_entry_dependency() */ /*------------------------------------------------------------------------- @@ -1660,8 +1654,6 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin) } } - return; - } /* dirty_entry() */ /*------------------------------------------------------------------------- @@ -1805,8 +1797,6 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o } } - return; - } /* execute_flush_op() */ /*------------------------------------------------------------------------- @@ -2032,8 +2022,6 @@ free_entry_arrays(void) HDfree(notify_entries); HDfree(orig_notify_entries); - return; - } /* free_entry_arrays() */ /*------------------------------------------------------------------------- @@ -2177,8 +2165,6 @@ reset_entries(void) } /* end for */ } /* end else */ - return; - } /* reset_entries() */ /*------------------------------------------------------------------------- @@ -2270,8 +2256,6 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_ } } - return; - } /* resize_entry() */ /*------------------------------------------------------------------------- @@ -2323,8 +2307,6 @@ verify_clean(void) } } - return; - } /* verify_clean() */ /*------------------------------------------------------------------------- @@ -2621,8 +2603,6 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_ i++; } /* while */ - return; - } /* verify_entry_status() */ /*------------------------------------------------------------------------- @@ -2676,8 +2656,6 @@ verify_unprotected(void) } } - return; - } /* verify_unprotected() */ /*------------------------------------------------------------------------- @@ -2741,8 +2719,6 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx) } } - return; - } /* expunge_entry() */ /*------------------------------------------------------------------------- @@ -2816,8 +2792,6 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_ } } - return; - } /* flush_cache() */ /*------------------------------------------------------------------------- @@ -2985,8 +2959,6 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) HDassert(((entry_ptr->header).type)->id == type); } /* end if */ - return; - } /* insert_entry() */ /*------------------------------------------------------------------------- @@ -3046,8 +3018,6 @@ mark_entry_dirty(int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* mark_entry_dirty() */ /*------------------------------------------------------------------------- @@ -3146,8 +3116,6 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr) HDassert(entry_ptr->is_dirty); } - return; - } /* move_entry() */ /*------------------------------------------------------------------------- @@ -3314,8 +3282,6 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* protect_entry_ro() */ /*------------------------------------------------------------------------- @@ -3372,8 +3338,6 @@ pin_entry(int32_t type, int32_t idx) } } /* end if */ - return; - } /* pin_entry() */ /*------------------------------------------------------------------------- @@ -3431,8 +3395,6 @@ unpin_entry(int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* unpin_entry() */ /*------------------------------------------------------------------------- @@ -3542,8 +3504,6 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count); } - return; - } /* unprotect_entry() */ /*------------------------------------------------------------------------- @@ -3972,8 +3932,6 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_row_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4234,8 +4192,6 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* row_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4328,8 +4284,6 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_row_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4422,8 +4376,6 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* col_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4527,8 +4479,6 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_col_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4633,8 +4583,6 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t if (verbose) HDfprintf(stdout, "%s: exiting.\n", FUNC); - return; - } /* col_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4738,8 +4686,6 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_col_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -5108,8 +5054,6 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d failure_mssg = "Unexpectedly low hit rate."; } - return; - } /* check_and_validate_cache_hit_rate() */ /*------------------------------------------------------------------------- @@ -5227,8 +5171,6 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c (long)min_clean_size, (long)cur_size, (long)cur_num_entries); } - return; - } /* check_and_validate_cache_size() */ H5_ATTR_PURE hbool_t @@ -5389,8 +5331,6 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t } } - return; - } /* validate_mdc_config() */ #if 0 /* debugging functions -- normally commented out */ diff --git a/test/cache_image.c b/test/cache_image.c index ecb8c05cf91..9c8f8558139 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -387,8 +387,6 @@ create_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* create_datasets() */ /*------------------------------------------------------------------------- @@ -460,8 +458,6 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* delete_datasets() */ /*------------------------------------------------------------------------- @@ -850,8 +846,6 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl if (show_progress) HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++); - return; - } /* open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -960,8 +954,6 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* attempt_swmr_open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -1199,8 +1191,6 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* verify_datasets() */ /****************************************************************************/ diff --git a/test/dsets.c b/test/dsets.c index 9b586ed20f6..98df82083a2 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -6976,6 +6976,7 @@ test_copy_dcpl(hid_t file, hid_t fapl) static herr_t test_filter_delete(hid_t file) { +#ifdef H5_HAVE_FILTER_DEFLATE H5Z_filter_t filtn; /* filter identification number */ hid_t dsid = -1; /* dataset ID */ hid_t sid = -1; /* dataspace ID */ @@ -6987,6 +6988,7 @@ test_filter_delete(hid_t file) unsigned flags; /* flags for filter */ herr_t ret; /* generic return value */ int i; +#endif TESTING("filter deletion"); @@ -7088,9 +7090,7 @@ test_filter_delete(hid_t file) goto error; PASSED(); -#else - SKIPPED(); -#endif + return SUCCEED; error: @@ -7103,6 +7103,10 @@ test_filter_delete(hid_t file) } H5E_END_TRY; return FAIL; +#else + SKIPPED(); + return SUCCEED; +#endif } /* end test_filter_delete() */ /*------------------------------------------------------------------------- diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c index 7f9a66493a5..5d6c1ef3bf5 100644 --- a/test/filter_plugin1_dsets.c +++ b/test/filter_plugin1_dsets.c @@ -26,14 +26,14 @@ static size_t add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned /* Filter class struct */ const H5Z_class2_t FILTER_INFO[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - FILTER1_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 1", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)add_sub_value, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER1_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + add_sub_value, /* The actual filter function */ }}; H5PL_type_t diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c index 08be78cee39..8f571219631 100644 --- a/test/filter_plugin2_dsets.c +++ b/test/filter_plugin2_dsets.c @@ -27,14 +27,14 @@ static size_t mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigne /* Filter class struct */ const H5Z_class2_t FILTER_INFO[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - FILTER2_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 2", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)mult_div_value, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER2_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 2", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + mult_div_value, /* The actual filter function */ }}; H5PL_type_t diff --git a/test/filter_plugin3_dsets.c b/test/filter_plugin3_dsets.c index 5d8d57f5b96..618ce061bb4 100644 --- a/test/filter_plugin3_dsets.c +++ b/test/filter_plugin3_dsets.c @@ -30,14 +30,14 @@ static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const uns /* Filter class struct */ const H5Z_class2_t FILTER_INFO[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - FILTER3_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 3", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER3_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 3", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + add_sub_value_hdf5, /* The actual filter function */ }}; H5PL_type_t diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c index 237642d2009..eeec269fa77 100644 --- a/test/filter_plugin4_groups.c +++ b/test/filter_plugin4_groups.c @@ -29,14 +29,14 @@ static size_t append_to_group_name(unsigned int flags, size_t cd_nelmts, const u /* Filter class struct */ const H5Z_class2_t FILTER_INFO[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - FILTER4_ID, /* Filter ID number */ - 1, /* Encoding enabled */ - 1, /* Decoding enabled */ - "test filter plugin 4", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)append_to_group_name, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + FILTER4_ID, /* Filter ID number */ + 1, /* Encoding enabled */ + 1, /* Decoding enabled */ + "test filter plugin 4", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + append_to_group_name, /* The actual filter function */ }}; H5PL_type_t diff --git a/test/genall5.c b/test/genall5.c index 6c6ffe6b762..05ad4a24274 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -103,8 +103,6 @@ ns_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; - } /* ns_grp_0 */ /*------------------------------------------------------------------------- @@ -222,7 +220,6 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; } /* vrfy_ns_grp_0() */ /*------------------------------------------------------------------------- @@ -363,8 +360,6 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; - } /* ns_grp_c() */ /*------------------------------------------------------------------------- @@ -640,7 +635,6 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; } /* vrfy_ns_grp_c() */ /*------------------------------------------------------------------------- @@ -776,7 +770,6 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; } /* ns_grp_d() */ /*------------------------------------------------------------------------- @@ -1050,8 +1043,6 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; - } /* vrfy_ns_grp_d() */ /*------------------------------------------------------------------------- @@ -1140,7 +1131,6 @@ os_grp_0(hid_t fid, const char *group_name) } } - return; } /* os_grp_0() */ /*------------------------------------------------------------------------- @@ -1257,7 +1247,6 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; } /* vrfy_os_grp_0() */ /*------------------------------------------------------------------------- @@ -1377,7 +1366,6 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) } } - return; } /* os_grp_n() */ /*------------------------------------------------------------------------- @@ -1603,7 +1591,6 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) HDassert(ret >= 0); } - return; } /* vrfy_os_grp_n() */ /*------------------------------------------------------------------------- @@ -1700,7 +1687,6 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_ctg_i */ /*------------------------------------------------------------------------- @@ -1919,8 +1905,6 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; - } /* vrfy_ds_ctg_i() */ /*------------------------------------------------------------------------- @@ -2047,7 +2031,6 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_chk_i */ /*------------------------------------------------------------------------- @@ -2281,7 +2264,6 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_chk_i() */ /*------------------------------------------------------------------------- @@ -2409,8 +2391,6 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; - } /* ds_cpt_i() */ /*------------------------------------------------------------------------- @@ -2624,7 +2604,6 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_cpt_i() */ /*------------------------------------------------------------------------- @@ -2773,7 +2752,6 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_ctg_v() */ /*------------------------------------------------------------------------- @@ -3038,7 +3016,6 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_ctg_v() */ /*------------------------------------------------------------------------- @@ -3266,7 +3243,6 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) vrfy_ds_ctg_v(fid, full_path, TRUE); } - return; } /* create_zoo() */ /*------------------------------------------------------------------------- @@ -3414,5 +3390,4 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) vrfy_ds_ctg_v(fid, full_path, TRUE); } - return; } /* validate_zoo() */ diff --git a/test/h5test.c b/test/h5test.c index 7e825ca0b94..f5eb08013c1 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -170,8 +170,6 @@ h5_clean_files(const char *base_name[], hid_t fapl) /* Close the FAPL used to access the file */ H5Pclose(fapl); - - return; } /* end h5_clean_files() */ /*------------------------------------------------------------------------- @@ -248,7 +246,6 @@ h5_delete_test_file(const char *base_name, hid_t fapl) HDremove(filename); } /* end driver selection tree */ - return; } /* end h5_delete_test_file() */ H5_GCC_DIAG_ON("format-nonliteral") @@ -281,7 +278,6 @@ h5_delete_all_test_files(const char *base_name[], hid_t fapl) h5_delete_test_file(base_name[i], fapl); } /* end for */ - return; } /* end h5_delete_all_test_files() */ /*------------------------------------------------------------------------- @@ -340,8 +336,6 @@ h5_test_shutdown(void) /* Restore the original error reporting routine */ h5_restore_err(); - - return; } /* end h5_test_shutdown() */ /*------------------------------------------------------------------------- @@ -448,8 +442,6 @@ h5_test_init(void) HDassert(err_func == NULL); H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); - - return; } /* end h5_test_init() */ /*------------------------------------------------------------------------- diff --git a/test/set_extent.c b/test/set_extent.c index 31fc5d9e32e..6d639ad208a 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2677,6 +2677,4 @@ test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4 (unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]); if (j >= 0) HDprintf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m); - - return; } /* end test_random_rank4_dump */ diff --git a/test/tarray.c b/test/tarray.c index a63ebd7d40d..ef61b2a44fa 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1086,7 +1086,6 @@ test_array_free_custom(void *_mem, void *info) HDfree(mem); } /* end if */ - return; } /* end test_array_free_custom() */ /*------------------------------------------------------------------------- diff --git a/test/tmisc.c b/test/tmisc.c index c7d60bf7554..7b88ca2c5c1 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -517,7 +517,6 @@ test_misc2_write_attribute(void) HDfree(string_att1); HDfree(string_att2); - return; } static void @@ -563,8 +562,6 @@ test_misc2_read_attribute(const char *filename, const char *att_name) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /**************************************************************** ** diff --git a/test/trefer.c b/test/trefer.c index 0d6ae751559..6422a1bdc96 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -832,7 +832,7 @@ test_reference_cmpnd_obj(void) hsize_t cmpnd_dims[] = {1}; hid_t dapl_id; /* Dataset access property list */ unsigned * ibuf, *obuf; - unsigned i, j; /* Counters */ + unsigned i; /* Counter */ H5O_type_t obj_type; /* Object type */ herr_t ret; /* Generic return value */ s2_t cmpnd_wbuf, cmpnd_rbuf; diff --git a/test/ttsafe.c b/test/ttsafe.c index 7b9a3752659..067a7159e0a 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -70,8 +70,6 @@ tts_is_threadsafe(void) if (is_ts != should_be) TestErrPrintf("Thread-safety value incorrect - test failed\n"); - - return; } /* Routine to generate attribute names for numeric values */ diff --git a/test/tvlstr.c b/test/tvlstr.c index 77b55a32569..0503e6248c6 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -659,8 +659,6 @@ test_write_vl_string_attribute(void) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /**************************************************************** @@ -739,8 +737,6 @@ test_read_vl_string_attribute(void) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /* Helper routine for test_vl_rewrite() */ @@ -864,8 +860,6 @@ test_vl_rewrite(void) ret = H5Fclose(file2); CHECK(ret, FAIL, "H5Fclose"); - - return; } /* end test_vl_rewrite() */ /**************************************************************** diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index f97ef502b0e..23abea5d52b 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3536,8 +3536,6 @@ get_member_types(hid_t tid, mcomp_t *members) get_member_types(members->ids[u], members->m[u]); } } - - return; } /*------------------------------------------------------------------------- diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index 471af51a452..2dc02bca640 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -5097,7 +5097,6 @@ help(char *name) (void)HDfprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n"); (void)HDfprintf(stdout, "\t of 7.\n"); (void)HDfprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n"); - return; } void @@ -5107,5 +5106,4 @@ usage(char *name) (void)HDfprintf(stdout, "\t%s -c[onfig] \ [ -c[config] ...] -o[utfile] \n\n", name); - return; } diff --git a/tools/test/h5copy/dynlib_copy.c b/tools/test/h5copy/dynlib_copy.c index 57de3bc15a8..d6e91fc42d0 100644 --- a/tools/test/h5copy/dynlib_copy.c +++ b/tools/test/h5copy/dynlib_copy.c @@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIBUD, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlibud", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlibud, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c index 4568ca17981..ce65f24fb61 100644 --- a/tools/test/h5diff/dynlib_diff.c +++ b/tools/test/h5diff/dynlib_diff.c @@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIBUD, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlibud", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlibud, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index b2f4e9e35bd..cf60a6a51aa 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -5009,8 +5009,6 @@ test_objs_nocomparables(const char *fname1, const char *fname2) H5Tclose(tid2); } H5E_END_TRY; - - return; } static hid_t @@ -8058,8 +8056,6 @@ test_double_epsilon(const char *fname1, const char *fname2) H5Fclose(fid2); } H5E_END_TRY; - - return; } /*------------------------------------------------------------------------- diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c index 4568ca17981..ce65f24fb61 100644 --- a/tools/test/h5dump/dynlib_dump.c +++ b/tools/test/h5dump/dynlib_dump.c @@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIBUD, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlibud", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlibud, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index e4aa805cf87..b8d33726c77 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -154,13 +154,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIBUD, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlibud", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlibud, /* The actual filter function */ }}; /* A UD link traversal function. Shouldn't actually be called. */ @@ -6548,7 +6548,6 @@ gent_bigdims(void) H5Fclose(fid); } H5E_END_TRY; - return; } /*------------------------------------------------------------------------- @@ -6734,7 +6733,6 @@ gent_group_creation_order(void) H5Fclose(fid); } H5E_END_TRY; - return; } /*------------------------------------------------------------------------- @@ -6994,7 +6992,6 @@ gent_attr_creation_order(void) H5Fclose(fid); } H5E_END_TRY; - return; } /*------------------------------------------------------------------------- diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c index 4568ca17981..ce65f24fb61 100644 --- a/tools/test/h5ls/dynlib_ls.c +++ b/tools/test/h5ls/dynlib_ls.c @@ -25,13 +25,13 @@ static size_t H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const un /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIBUD[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIBUD, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlibud", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlibud, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIBUD, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlibud", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlibud, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/h5repack/dynlib_rpk.c b/tools/test/h5repack/dynlib_rpk.c index e64e67b22d0..b228344e7a9 100644 --- a/tools/test/h5repack/dynlib_rpk.c +++ b/tools/test/h5repack/dynlib_rpk.c @@ -27,13 +27,13 @@ static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, const uns /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIB1[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIB1, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlib1", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIB1, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlib1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlib1, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/h5repack/dynlib_vrpk.c b/tools/test/h5repack/dynlib_vrpk.c index 2db97daa9fc..5eac4f2a348 100644 --- a/tools/test/h5repack/dynlib_vrpk.c +++ b/tools/test/h5repack/dynlib_vrpk.c @@ -27,13 +27,13 @@ static size_t H5Z_filter_dynlib4(unsigned int flags, size_t cd_nelmts, const uns /* This message derives from H5Z */ const H5Z_class2_t H5Z_DYNLIB4[1] = {{ - H5Z_CLASS_T_VERS, /* H5Z_class_t version */ - H5Z_FILTER_DYNLIB4, /* Filter id number */ - 1, 1, /* Encoding and decoding enabled */ - "dynlib4", /* Filter name for debugging */ - NULL, /* The "can apply" callback */ - NULL, /* The "set local" callback */ - (H5Z_func_t)H5Z_filter_dynlib4, /* The actual filter function */ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIB4, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlib4", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + H5Z_filter_dynlib4, /* The actual filter function */ }}; H5PL_type_t diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index a93d6730176..d8ed9ec0e0d 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -818,8 +818,10 @@ main(int argc, char **argv) goto error; #ifdef H5_HAVE_PARALLEL if (facc_type != FACC_DEFAULT && MAINPROCESS) -#endif /*H5_HAVE_PARALLEL*/ printf("All metadata performance tests passed.\n"); +#else + printf("All metadata performance tests passed.\n"); +#endif /*H5_HAVE_PARALLEL*/ return 0;