diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-07-26 21:45:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 21:45:46 (GMT) |
commit | ae414872f50187e64cbd6cc8f076c22cf5df2d53 (patch) | |
tree | b616f33f5daa89f213e7c64e04c63afde906e939 /hl/src | |
parent | 213eac2588369f75a11df6bb1788dde33c4b82e2 (diff) | |
download | hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.zip hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.gz hdf5-ae414872f50187e64cbd6cc8f076c22cf5df2d53.tar.bz2 |
Develop clang 13 format (#1933)
* Update format source to clang 13
* More format changes
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DO.c | 4 | ||||
-rw-r--r-- | hl/src/H5DS.c | 30 | ||||
-rw-r--r-- | hl/src/H5IM.c | 4 | ||||
-rw-r--r-- | hl/src/H5LD.c | 12 | ||||
-rw-r--r-- | hl/src/H5LT.c | 40 | ||||
-rw-r--r-- | hl/src/H5LTprivate.h | 2 | ||||
-rw-r--r-- | hl/src/H5PT.c | 2 | ||||
-rw-r--r-- | hl/src/H5TB.c | 30 |
8 files changed, 62 insertions, 62 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index 1703669..d58957f 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -118,9 +118,9 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t hsize_t stride[H5S_MAX_RANK]; /* H5Sselect_hyperslab: # of elements to move when selecting */ hsize_t block[H5S_MAX_RANK]; /* H5Sselect_hyperslab: # of elements in a block */ - hsize_t * boundary = NULL; /* Boundary set in append flush property */ + hsize_t *boundary = NULL; /* Boundary set in append flush property */ H5D_append_cb_t append_cb; /* Callback function set in append flush property */ - void * udata; /* User data set in append flush property */ + void *udata; /* User data set in append flush property */ hbool_t hit = FALSE; /* Boundary is hit or not */ hsize_t k; /* Local index variable */ unsigned u; /* Local index variable */ diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index d55512f..91f0e0c 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -164,7 +164,7 @@ H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx) H5R_ref_t nref_j; hbool_t is_new_ref; - hvl_t * buf = NULL; /* VL buffer to store in the attribute */ + hvl_t *buf = NULL; /* VL buffer to store in the attribute */ hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */ H5O_info2_t oi1, oi2; H5I_type_t it1, it2; @@ -740,14 +740,14 @@ H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx) hid_t ntid = H5I_INVALID_HID; /* attribute native type ID */ hid_t aid = H5I_INVALID_HID; /* attribute ID */ int rank; /* rank of dataset */ - nds_list_t * ndsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ - nds_list_t * ndsbuf_w = NULL; /* array of attribute data in the DS pointing to the dataset to write*/ - ds_list_t * dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ - ds_list_t * dsbuf_w = NULL; /* array of attribute data in the DS pointing to the dataset to write*/ + nds_list_t *ndsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ + nds_list_t *ndsbuf_w = NULL; /* array of attribute data in the DS pointing to the dataset to write*/ + ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ + ds_list_t *dsbuf_w = NULL; /* array of attribute data in the DS pointing to the dataset to write*/ hsize_t dims[1]; /* dimension of the "REFERENCE_LIST" array */ H5R_ref_t nref; hobj_ref_t ref; /* reference to the DS */ - hvl_t * buf = NULL; /* VL buffer to store in the attribute */ + hvl_t *buf = NULL; /* VL buffer to store in the attribute */ int i; size_t j; hssize_t ii; @@ -1237,10 +1237,10 @@ H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx) hid_t aid = H5I_INVALID_HID; /* attribute ID */ int rank; /* rank of dataset */ nds_list_t *ndsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ - ds_list_t * dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ + ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ H5R_ref_t nref; /* reference to the DS */ hobj_ref_t ref; /* reference to the DS */ - hvl_t * buf = NULL; /* VL buffer to store in the attribute */ + hvl_t *buf = NULL; /* VL buffer to store in the attribute */ hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */ hid_t did_i; /* dataset ID in REFERENCE_LIST */ H5O_info2_t oi1, oi2, oi3, oi4; @@ -1605,7 +1605,7 @@ H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx, H5DS_iterate_t visi hid_t sid; /* space ID */ hid_t tid = H5I_INVALID_HID; /* attribute type ID */ hid_t aid = H5I_INVALID_HID; /* attribute ID */ - hvl_t * buf = NULL; /* VL buffer to store in the attribute */ + hvl_t *buf = NULL; /* VL buffer to store in the attribute */ H5I_type_t it; /* ID type */ herr_t ret_value = 0; int j_idx; @@ -1796,7 +1796,7 @@ H5DSset_label(hid_t did, unsigned int idx, const char *label) H5I_type_t it; /* ID type */ unsigned int i; union { /* union is needed to eliminate compiler warnings about */ - char ** buf; /* discarding the 'const' qualifier in the free */ + char **buf; /* discarding the 'const' qualifier in the free */ char const **const_buf; /* buf calls */ } u; @@ -1995,7 +1995,7 @@ H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size) hid_t tid = H5I_INVALID_HID; /* attribute type ID */ hid_t aid = H5I_INVALID_HID; /* attribute ID */ int rank; /* rank of dataset */ - char ** buf = NULL; /* buffer to store in the attribute */ + char **buf = NULL; /* buffer to store in the attribute */ H5I_type_t it; /* ID type */ size_t nbytes = 0; size_t copy_len; @@ -2145,7 +2145,7 @@ H5DSget_scale_name(hid_t did, char *name, size_t size) size_t nbytes; size_t copy_len; htri_t has_name; - char * buf = NULL; + char *buf = NULL; /*------------------------------------------------------------------------- * parameter checking @@ -2259,7 +2259,7 @@ H5DSis_scale(hid_t did) htri_t attr_class; /* has the "CLASS" attribute */ htri_t is_ds = -1; /* set to "not a dimension scale" */ H5I_type_t it; /* type of identifier */ - char * buf = NULL; /* buffer to read name of attribute */ + char *buf = NULL; /* buffer to read name of attribute */ size_t string_size; /* size of storage for the attribute */ H5T_class_t type_class; H5T_str_t strpad; @@ -2372,7 +2372,7 @@ H5DSget_num_scales(hid_t did, unsigned int idx) hid_t tid = H5I_INVALID_HID; /* attribute type ID */ hid_t aid = H5I_INVALID_HID; /* attribute ID */ int rank; /* rank of dataset */ - hvl_t * buf = NULL; /* VL buffer to store in the attribute */ + hvl_t *buf = NULL; /* VL buffer to store in the attribute */ H5I_type_t it; /* ID type */ int nscales; @@ -2484,7 +2484,7 @@ H5DS_is_reserved(hid_t did, hbool_t *is_reserved) htri_t has_class; hid_t tid = H5I_INVALID_HID; hid_t aid = H5I_INVALID_HID; - char * buf = NULL; /* Name of attribute */ + char *buf = NULL; /* Name of attribute */ size_t string_size; /* Size of storage for attribute */ /* Try to find the attribute "CLASS" on the dataset */ diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 75f2e28..390f222 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -1064,7 +1064,7 @@ H5IMis_image(hid_t loc_id, const char *dset_name) htri_t has_class; hid_t atid; hid_t aid = -1; - char * attr_data; /* Name of attribute */ + char *attr_data; /* Name of attribute */ hsize_t storage_size; /* Size of storage for attribute */ herr_t ret; @@ -1165,7 +1165,7 @@ H5IMis_palette(hid_t loc_id, const char *dset_name) htri_t has_class; hid_t atid; hid_t aid = -1; - char * attr_data; /* Name of attribute */ + char *attr_data; /* Name of attribute */ hsize_t storage_size; /* Size of storage for attribute */ herr_t ret; diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c index 2368127..0cbf65d 100644 --- a/hl/src/H5LD.c +++ b/hl/src/H5LD.c @@ -157,7 +157,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid) { int nfields; /* The # of comma-separated fields in "fields" */ hbool_t end_of_fields = FALSE; /* end of "fields" */ - char * fields_ptr; /* Pointer to "fields" */ + char *fields_ptr; /* Pointer to "fields" */ int ret_value = FAIL; /* Return value */ HDassert(listv); @@ -169,7 +169,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[] /*OUT*/, hid_t par_tid) /* Process till end of "fields" */ while (!end_of_fields) { H5LD_memb_t *memb = NULL; /* Pointer to structure for storing a field's info */ - char * cur; /* Pointer to a member in a field */ + char *cur; /* Pointer to a member in a field */ size_t len; /* Estimated # of members in a field */ hbool_t gotcomma = FALSE; /* A comma encountered */ hbool_t gotmember = FALSE; /* Getting member in a field */ @@ -335,7 +335,7 @@ H5LD_get_dset_type_size(hid_t did, const char *fields) hid_t dset_tid = -1; /* Dataset's type identifier */ hid_t tid = -1; /* Native Type identifier */ H5LD_memb_t **listv = NULL; /* Vector for storing information in "fields" */ - char * dup_fields = NULL; /* A copy of "fields" */ + char *dup_fields = NULL; /* A copy of "fields" */ size_t ret_value = 0; /* Return value */ /* Get the datatype of the dataset */ @@ -421,8 +421,8 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims hsize_t start[H5S_MAX_RANK]; /* Starting offset */ hsize_t count[H5S_MAX_RANK]; /* ??offset */ H5LD_memb_t **listv = NULL; /* Vector for storing information in "fields" */ - char * dup_fields = NULL; /* A copy of "fields" */ - char * sav_buf = NULL; /* Saved pointer temporary buffer */ + char *dup_fields = NULL; /* A copy of "fields" */ + char *sav_buf = NULL; /* Saved pointer temporary buffer */ unsigned ctr; /* Counter for # of curr_dims > prev_dims */ int ndims; /* Number of dimensions for the dataset */ int i; /* Local index variable */ @@ -494,7 +494,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims } /* end if */ else { /* "fields" is specified */ unsigned char *buf_p = (unsigned char *)buf; /* Pointer to the destination buffer */ - char * tmp_buf; /* Temporary buffer for data read */ + char *tmp_buf; /* Temporary buffer for data read */ size_t tot_tsize; /* Total datatype size */ size_t len; /* Estimate the number of comma-separated fields in "fields" */ diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 78cc301..54bb9c4 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -20,7 +20,7 @@ #define TMP_LEN 256 #define MAX(a, b) (((a) > (b)) ? (a) : (b)) size_t input_len; -char * myinput; +char *myinput; size_t indent = 0; /* File Image operations @@ -57,12 +57,12 @@ size_t indent = 0; /* Data structure to pass application data to callbacks. */ typedef struct { - void * app_image_ptr; /* Pointer to application buffer */ + void *app_image_ptr; /* Pointer to application buffer */ size_t app_image_size; /* Size of application buffer */ - void * fapl_image_ptr; /* Pointer to FAPL buffer */ + void *fapl_image_ptr; /* Pointer to FAPL buffer */ size_t fapl_image_size; /* Size of FAPL buffer */ int fapl_ref_count; /* Reference counter for FAPL buffer */ - void * vfd_image_ptr; /* Pointer to VFD buffer */ + void *vfd_image_ptr; /* Pointer to VFD buffer */ size_t vfd_image_size; /* Size of VFD buffer */ int vfd_ref_count; /* Reference counter for VFD buffer */ unsigned flags; /* Flags indicate how the file image will */ @@ -71,12 +71,12 @@ typedef struct { } H5LT_file_image_ud_t; /* callbacks prototypes for file image ops */ -static void * image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *udata); -static void * image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op, +static void *image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *udata); +static void *image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op, void *udata); -static void * image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata); +static void *image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata); static herr_t image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *udata); -static void * udata_copy(void *udata); +static void *udata_copy(void *udata); static herr_t udata_free(void *udata); /* Definition of callbacks for file image operations. */ @@ -102,7 +102,7 @@ static void * image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata) { H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata; - void * return_value = NULL; + void *return_value = NULL; /* callback is only used if the application buffer is not actually copied */ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY)) @@ -282,7 +282,7 @@ static void * image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *_udata) { H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata; - void * return_value = NULL; + void *return_value = NULL; /* callback is only used if the application buffer is not actually copied */ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY)) @@ -2196,7 +2196,7 @@ out: static char * print_enum(hid_t type, char *str, size_t *str_len, hbool_t no_ubuf, size_t indt) { - char ** name = NULL; /*member names */ + char **name = NULL; /*member names */ unsigned char *value = NULL; /*value array */ int nmembs; /*number of members */ char tmp_str[TMP_LEN]; @@ -2332,7 +2332,7 @@ herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len) { size_t str_len = INCREMENT; - char * text_str = NULL; + char *text_str = NULL; herr_t ret = SUCCEED; if (lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG) @@ -2723,7 +2723,7 @@ next: case H5T_ENUM: { hid_t super; size_t super_len; - char * stmp = NULL; + char *stmp = NULL; /* Print lead-in */ HDsnprintf(dt_str, *slen, "H5T_ENUM {\n"); @@ -2770,7 +2770,7 @@ next: case H5T_VLEN: { hid_t super; size_t super_len; - char * stmp = NULL; + char *stmp = NULL; /* Print lead-in */ HDsnprintf(dt_str, *slen, "H5T_VLEN {\n"); @@ -2813,7 +2813,7 @@ next: case H5T_ARRAY: { hid_t super; size_t super_len; - char * stmp = NULL; + char *stmp = NULL; hsize_t dims[H5S_MAX_RANK]; int ndims; @@ -2871,12 +2871,12 @@ next: break; } case H5T_COMPOUND: { - char * mname = NULL; + char *mname = NULL; hid_t mtype; size_t moffset; H5T_class_t mclass; size_t mlen; - char * mtmp = NULL; + char *mtmp = NULL; int nmembs; if ((nmembs = H5Tget_nmembers(dtype)) < 0) @@ -3575,9 +3575,9 @@ out: htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid) { - char * tmp_path = NULL; /* Temporary copy of the path */ - char * curr_name; /* Pointer to current component of path name */ - char * delimit; /* Pointer to path delimiter during traversal */ + char *tmp_path = NULL; /* Temporary copy of the path */ + char *curr_name; /* Pointer to current component of path name */ + char *delimit; /* Pointer to path delimiter during traversal */ H5I_type_t obj_type; htri_t link_exists, obj_exists; size_t path_length; diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index e5c4e4e..4e9a25c 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -24,7 +24,7 @@ H5_HLDLL herr_t H5LT_get_attribute_disk(hid_t obj_id, const char *attr_name, voi H5_HLDLL herr_t H5LT_set_attribute_numerical(hid_t loc_id, const char *obj_name, const char *attr_name, size_t size, hid_t type_id, const void *data); H5_HLDLL herr_t H5LT_set_attribute_string(hid_t dset_id, const char *name, const char *buf); -H5_HLDLL char * H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, +H5_HLDLL char *H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, hbool_t no_user_buf); H5_HLDLL hid_t H5LTyyparse(void); diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index f5fb99f..5e453e4 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -858,7 +858,7 @@ herr_t H5PTis_varlen(hid_t table_id) { H5T_class_t type; - htbl_t * table; + htbl_t *table; /* find the table struct from its ID */ if ((table = (htbl_t *)H5Iobject_verify(table_id, H5PT_ptable_id_type)) == NULL) diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c index eda3a35..7c8df6c 100644 --- a/hl/src/H5TB.c +++ b/hl/src/H5TB.c @@ -66,7 +66,7 @@ H5TBmake_table(const char *table_title, hid_t loc_id, const char *dset_name, hsi hsize_t dims_chunk[1]; hsize_t maxdims[1] = {H5S_UNLIMITED}; char attr_name[255]; - char * member_name = NULL; + char *member_name = NULL; unsigned char *tmp_buf = NULL; hsize_t i; herr_t ret_val = -1; @@ -437,7 +437,7 @@ H5TBwrite_fields_name(hid_t loc_id, const char *dset_name, const char *field_nam hssize_t i, j; hsize_t count[1]; hsize_t offset[1]; - char * member_name = NULL; + char *member_name = NULL; size_t size_native; herr_t ret_val = -1; @@ -595,7 +595,7 @@ H5TBwrite_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, con hsize_t offset[1]; hsize_t i; size_t size_native; - char * member_name = NULL; + char *member_name = NULL; herr_t ret_val = -1; /* check the arguments */ @@ -899,7 +899,7 @@ H5TBread_fields_name(hid_t loc_id, const char *dset_name, const char *field_name hsize_t offset[1]; hsize_t mem_size[1]; size_t size_native; - char * member_name = NULL; + char *member_name = NULL; hssize_t i, j; herr_t ret_val = -1; @@ -1056,7 +1056,7 @@ H5TBread_fields_index(hid_t loc_id, const char *dset_name, hsize_t nfields, cons hsize_t mem_size[1]; hsize_t i; size_t size_native; - char * member_name = NULL; + char *member_name = NULL; herr_t ret_val = -1; /* check the arguments */ @@ -1212,8 +1212,8 @@ H5TBdelete_record(hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nr hsize_t mem_size[1]; hsize_t dims[1]; size_t src_size; - size_t * src_offset = NULL; - size_t * src_sizes = NULL; + size_t *src_offset = NULL; + size_t *src_sizes = NULL; unsigned char *tmp_buf = NULL; herr_t ret_val = -1; @@ -1524,8 +1524,8 @@ H5TBadd_records_from(hid_t loc_id, const char *dset_name1, hsize_t start1, hsize hsize_t ntotal_records; size_t type_size1; size_t src_size; - size_t * src_offset = NULL; - size_t * src_sizes = NULL; + size_t *src_offset = NULL; + size_t *src_sizes = NULL; unsigned char *tmp_buf = NULL; herr_t ret_val = -1; @@ -1672,8 +1672,8 @@ H5TBcombine_tables(hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const c size_t type_size; size_t member_offset; size_t src_size; - size_t * src_offset = NULL; - size_t * src_sizes = NULL; + size_t *src_offset = NULL; + size_t *src_sizes = NULL; char attr_name[255]; unsigned char *tmp_buf = NULL; unsigned char *tmp_fill_buf = NULL; @@ -2033,7 +2033,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi hsize_t i; char table_title[255]; char attr_name[255]; - char * member_name = NULL; + char *member_name = NULL; unsigned char *tmp_buf = NULL; unsigned char *tmp_fill_buf = NULL; hbool_t inserted; @@ -2446,7 +2446,7 @@ H5TBdelete_field(hid_t loc_id, const char *dset_name, const char *field_name) hsize_t i; char attr_name[255]; char table_title[255]; - char * member_name = NULL; + char *member_name = NULL; unsigned char *tmp_buf = NULL; unsigned char *tmp_fill_buf = NULL; htri_t has_fill = FALSE; @@ -3207,7 +3207,7 @@ H5TB_attach_attributes(const char *table_title, hid_t loc_id, const char *dset_n hid_t tid) { char attr_name[255]; - char * member_name = NULL; + char *member_name = NULL; hsize_t i; herr_t ret_val = -1; @@ -3272,7 +3272,7 @@ H5TB_create_type(hid_t loc_id, const char *dset_name, size_t type_size, const si hid_t nmtype_id = H5I_INVALID_HID; size_t size_native; hsize_t nfields = 0; - char ** fnames = NULL; + char **fnames = NULL; unsigned i; hid_t ret_val = -1; |