diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-10 20:41:20 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:31:55 (GMT) |
commit | 28103327a504047620c8fccd39a649f25d3c4c38 (patch) | |
tree | ed352d52c3fef9869f6d14d15ded90c3951fd094 /src | |
parent | 5640d832e40ab627faef705e1c3f223cfb990e24 (diff) | |
download | hdf5-28103327a504047620c8fccd39a649f25d3c4c38.zip hdf5-28103327a504047620c8fccd39a649f25d3c4c38.tar.gz hdf5-28103327a504047620c8fccd39a649f25d3c4c38.tar.bz2 |
H5_HAVE_PARALLEL, _DEBUG_API, etc. Add attributes to some variables and
parameters that are unused under some configurations.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5B2leaf.c | 2 | ||||
-rw-r--r-- | src/H5I.c | 3 | ||||
-rw-r--r-- | src/H5Odbg.c | 4 | ||||
-rw-r--r-- | src/H5Pfapl.c | 3 | ||||
-rw-r--r-- | src/H5VLnative_attr.c | 3 | ||||
-rw-r--r-- | src/H5VLnative_group.c | 5 | ||||
-rw-r--r-- | src/H5Z.c | 3 | ||||
-rw-r--r-- | src/H5private.h | 53 |
8 files changed, 53 insertions, 23 deletions
diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index b50efad..5ce1a26 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -1051,7 +1051,7 @@ H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr, *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_leaf2(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2) +H5B2__assert_leaf2(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr, const H5B2_leaf_t H5_ATTR_NDEBUG_UNUSED *leaf, const H5B2_leaf_t H5_ATTR_UNUSED *leaf2) { /* General sanity checking on node */ HDassert(leaf->nrec <= hdr->node_info->split_nrec); @@ -215,7 +215,8 @@ H5I_term_package(void) *------------------------------------------------------------------------- */ H5I_type_t -H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func) +H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, + H5I_free_t free_func) { H5I_class_t *cls = NULL; /* New ID class */ H5I_type_t new_type; /* New ID type value */ diff --git a/src/H5Odbg.c b/src/H5Odbg.c index b8190ae..3c91cae 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -153,7 +153,7 @@ H5O__assert(const H5O_t *oh) /* Loop over all messages in object header */ for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) { - uint8_t *curr_hdr; /* Start of current message header */ + uint8_t H5_ATTR_NDEBUG_UNUSED *curr_hdr; /* Start of current message header */ size_t curr_tot_size; /* Total size of current message (including header) */ curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh); @@ -164,7 +164,7 @@ H5O__assert(const H5O_t *oh) free_space += curr_tot_size; else if(H5O_CONT_ID == curr_msg->type->id) { H5O_cont_t *cont = (H5O_cont_t *)curr_msg->native; - hbool_t found_chunk = FALSE; /* Found a chunk that matches */ + hbool_t H5_ATTR_NDEBUG_UNUSED found_chunk = FALSE; /* Found a chunk that matches */ HDassert(cont); diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 16f1e0e..fb9b56a 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4599,7 +4599,8 @@ H5P_facc_mdc_log_location_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_ *------------------------------------------------------------------------- */ herr_t -H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close) +H5Pset_evict_on_close(hid_t fapl_id, + hbool_t H5_ATTR_PARALLEL_UNUSED evict_on_close) { H5P_genplist_t *plist; /* property list pointer */ herr_t ret_value = SUCCEED; /* return value */ diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c index e54c49f..8072cd5 100644 --- a/src/H5VLnative_attr.c +++ b/src/H5VLnative_attr.c @@ -525,7 +525,8 @@ done: */ herr_t H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, H5VL_attr_optional_t opt_type, - hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments) + hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, + va_list H5_ATTR_DEPRECATED_USED arguments) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c index 3fdb2d9..236ee9d 100644 --- a/src/H5VLnative_group.c +++ b/src/H5VLnative_group.c @@ -266,8 +266,9 @@ done: *------------------------------------------------------------------------- */ herr_t -H5VL__native_group_optional(void *obj, H5VL_group_optional_t optional_type, - hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments) +H5VL__native_group_optional(void H5_ATTR_UNUSED *obj, + H5VL_group_optional_t optional_type, hid_t H5_ATTR_UNUSED dxpl_id, + void H5_ATTR_UNUSED **req, va_list H5_ATTR_DEPRECATED_USED arguments) { herr_t ret_value = SUCCEED; /* Return value */ @@ -585,7 +585,8 @@ done: *------------------------------------------------------------------------- */ static int -H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key) +H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, + void *key H5_ATTR_PARALLEL_USED) { H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */ #ifdef H5_HAVE_PARALLEL diff --git a/src/H5private.h b/src/H5private.h index 19bbb1c..44ad25c 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -304,17 +304,38 @@ * file). Be sure to update that file if the #ifdefs change here. */ #ifdef __cplusplus -# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ -# define H5_ATTR_UNUSED /*void*/ -# define H5_ATTR_SANITY_CHECK /*void*/ -# define H5_ATTR_NORETURN /*void*/ -# define H5_ATTR_CONST /*void*/ -# define H5_ATTR_PURE /*void*/ -# define H5_ATTR_FALLTHROUGH /*void*/ +# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ +# define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_DEPRECATED_USED /*void*/ +# define H5_ATTR_NDEBUG_UNUSED /*void*/ +# define H5_ATTR_DEBUG_API_USED /*void*/ +# define H5_ATTR_PARALLEL_UNUSED /*void*/ +# define H5_ATTR_PARALLEL_USED /*void*/ +# define H5_ATTR_NORETURN /*void*/ +# define H5_ATTR_CONST /*void*/ +# define H5_ATTR_PURE /*void*/ +# define H5_ATTR_FALLTHROUGH /*void*/ #else /* __cplusplus */ #if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) # define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) # define H5_ATTR_UNUSED __attribute__((unused)) +#ifdef H5_HAVE_PARALLEL +# define H5_ATTR_PARALLEL_UNUSED __attribute__((unused)) +# define H5_ATTR_PARALLEL_USED /*void*/ +#else +# define H5_ATTR_PARALLEL_UNUSED /*void*/ +# define H5_ATTR_PARALLEL_USED __attribute__((unused)) +#endif +#ifdef H5_NO_DEPRECATED_SYMBOLS +#define H5_ATTR_DEPRECATED_USED H5_ATTR_UNUSED +#else /* H5_NO_DEPRECATED_SYMBOLS */ +#define H5_ATTR_DEPRECATED_USED /*void*/ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#ifdef H5_DEBUG_API +#define H5_ATTR_DEBUG_API_USED /*void*/ +#else /* H5_DEBUG_API */ +#define H5_ATTR_DEBUG_API_USED H5_ATTR_UNUSED +#endif /* H5_DEBUG_API */ #ifndef NDEBUG #define H5_ATTR_SANITY_CHECK /*void*/ #else /* NDEBUG */ @@ -329,13 +350,17 @@ # define H5_ATTR_FALLTHROUGH /*void*/ #endif #else -# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ -# define H5_ATTR_UNUSED /*void*/ -# define H5_ATTR_SANITY_CHECK /*void*/ -# define H5_ATTR_NORETURN /*void*/ -# define H5_ATTR_CONST /*void*/ -# define H5_ATTR_PURE /*void*/ -# define H5_ATTR_FALLTHROUGH /*void*/ +# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ +# define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_NDEBUG_UNUSED /*void*/ +# define H5_ATTR_DEBUG_API_USED /*void*/ +# define H5_ATTR_DEPRECATED_USED /*void*/ +# define H5_ATTR_PARALLEL_UNUSED /*void*/ +# define H5_ATTR_PARALLEL_USED /*void*/ +# define H5_ATTR_NORETURN /*void*/ +# define H5_ATTR_CONST /*void*/ +# define H5_ATTR_PURE /*void*/ +# define H5_ATTR_FALLTHROUGH /*void*/ #endif #endif /* __cplusplus */ |