diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-09-17 17:21:34 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-09-17 17:21:34 (GMT) |
commit | 944e42d5ea758f7c05a7aed9d344096cbc9b0be7 (patch) | |
tree | 0334707212774a56594fe714a795275c25d93804 | |
parent | 2ddf84b036f7d458bf2878db3ca36336c0ca7de7 (diff) | |
download | hdf5-944e42d5ea758f7c05a7aed9d344096cbc9b0be7.zip hdf5-944e42d5ea758f7c05a7aed9d344096cbc9b0be7.tar.gz hdf5-944e42d5ea758f7c05a7aed9d344096cbc9b0be7.tar.bz2 |
[svn-r27818] Minor warning fixes.
Tested on: h5committest
-rw-r--r-- | fortran/src/H5f90proto.h | 2 | ||||
-rw-r--r-- | fortran/src/H5match_types.c | 10 | ||||
-rw-r--r-- | hl/fortran/src/H5LTfc.c | 4 | ||||
-rw-r--r-- | src/H5FD.c | 1 | ||||
-rw-r--r-- | test/gen_cross.c | 68 | ||||
-rw-r--r-- | test/gen_plist.c | 16 | ||||
-rw-r--r-- | tools/h5jam/h5jamgentest.c | 6 |
7 files changed, 46 insertions, 61 deletions
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 1d08d7e..f8b4564 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -196,6 +196,8 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf); +H5_FCDLL int_f h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, + hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id); H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num); H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf); diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 37509a0..f995e83 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -149,8 +149,6 @@ int main(void) { int FoundIntSize[10]; int FoundIntSizeKind[10]; - int FoundRealSize[10]; - int FoundRealSizeKind[10]; int i, j,flag; char chrA[32],chrB[32]; @@ -382,16 +380,8 @@ int main(void) /* it a value of the next larger one, but if the next */ /* higher one is not available we assigned it the next lowest */ - FoundRealSize[0] = -1; - FoundRealSize[1] = -1; - FoundRealSize[2] = -1; - FoundRealSize[3] = -1; - FoundRealSize[4] = -1; - for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) { if (RealKinds[i] > 0) { - FoundRealSize[i] = (int)RealKinds[i]; - FoundRealSizeKind[i] = (int)RealKinds_SizeOf[i]; sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]); sprintf(chrB, "real_%s_f", Real_C_TYPES[i]); writeToFiles("float",chrA, chrB, RealKinds[i], RealKinds_SizeOf[i]); diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index c955590..3a94664 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -298,7 +298,7 @@ h5ltset_attribute_c(hid_t_f *loc_id, void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; - herr_t ret; + herr_t ret = SUCCEED; hid_t c_loc_id; char *c_name = NULL; char *c_attrname = NULL; @@ -394,7 +394,7 @@ h5ltget_attribute_c(hid_t_f *loc_id, void *buf, char *dtype, size_t_f *sizeof_val) { int ret_value = -1; - herr_t ret; + herr_t ret = SUCCEED; hid_t c_loc_id; char *c_name = NULL; char *c_attrname = NULL; @@ -413,7 +413,6 @@ H5FD_get_class(hid_t id) ret_value = (H5FD_class_t *)H5I_object(id); else { H5P_genplist_t *plist; /* Property list pointer */ - hid_t driver_id = -1; /* Get the plist structure */ if(NULL == (plist = (H5P_genplist_t *)H5I_object(id))) diff --git a/test/gen_cross.c b/test/gen_cross.c index 2d4b788..816064d 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -100,9 +100,9 @@ int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid); int create_normal_dset(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* file and dataset handles */ - hid_t dcpl; - float data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* file and dataset handles */ + hid_t dcpl = -1; + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; int i, j; @@ -207,9 +207,9 @@ error: int create_scale_offset_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - float data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -298,9 +298,9 @@ error: int create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - double data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + double data[NX][NY]; /* data to write */ double fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -389,9 +389,9 @@ error: int create_scale_offset_dsets_char(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - char data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + char data[NX][NY]; /* data to write */ char fillvalue = -2; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -488,9 +488,9 @@ error: int create_scale_offset_dsets_short(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - short data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + short data[NX][NY]; /* data to write */ short fillvalue = -2; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -587,9 +587,9 @@ error: int create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - int data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + int data[NX][NY]; /* data to write */ int fillvalue = -2; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -687,9 +687,9 @@ error: int create_scale_offset_dsets_long_long(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - long long data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + long long data[NX][NY]; /* data to write */ long long fillvalue = -2; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -786,9 +786,9 @@ error: int create_fletcher_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - float data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -878,9 +878,9 @@ int create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { #ifdef H5_HAVE_FILTER_DEFLATE - hid_t dataset; /* dataset handles */ - hid_t dcpl; - float data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -1070,9 +1070,9 @@ error: int create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t dcpl; - float data[NX][NY]; /* data to write */ + hid_t dataset = -1; /* dataset handles */ + hid_t dcpl = -1; + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; @@ -1161,11 +1161,11 @@ error: int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid) { - hid_t dataset; /* dataset handles */ - hid_t datatype; - hid_t dcpl; + hid_t dataset = -1; /* dataset handles */ + hid_t datatype = -1; + hid_t dcpl = -1; size_t precision, offset; - float data[NX][NY]; /* data to write */ + float data[NX][NY]; /* data to write */ float fillvalue = -2.2f; hsize_t chunk[RANK] = {CHUNK0, CHUNK1}; int i, j; diff --git a/test/gen_plist.c b/test/gen_plist.c index 2746462..f071733 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -64,26 +64,26 @@ main(void) 1 /*TRUE*/, 0 /*FALSE*/, ( 2 * 2048 * 1024), - 0.3, + 0.3f, (64 * 1024 * 1024), (4 * 1024 * 1024), 60000, H5C_incr__threshold, - 0.8, - 3.0, + 0.8f, + 3.0f, 1 /*TRUE*/, (8 * 1024 * 1024), H5C_flash_incr__add_space, - 2.0, - 0.25, + 2.0f, + 0.25f, H5C_decr__age_out_with_threshold, - 0.997, - 0.8, + 0.997f, + 0.8f, 1 /*TRUE*/, (3 * 1024 * 1024), 3, 0 /*FALSE*/, - 0.2, + 0.2f, (256 * 2048), H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY}; diff --git a/tools/h5jam/h5jamgentest.c b/tools/h5jam/h5jamgentest.c index ef45372..d3166b5 100644 --- a/tools/h5jam/h5jamgentest.c +++ b/tools/h5jam/h5jamgentest.c @@ -89,12 +89,6 @@ typedef struct s1_t { } s1_t; -/* 1-D array datatype */ -#define ARRAY1_RANK 1 - -/* 2-D array datatype */ -#define ARRAY3_DIM2 3 - /* A UD link traversal function. Shouldn't actually be called. */ static hid_t UD_traverse(const char H5_ATTR_UNUSED * link_name, hid_t H5_ATTR_UNUSED cur_group, const void H5_ATTR_UNUSED * udata, size_t H5_ATTR_UNUSED udata_size, hid_t H5_ATTR_UNUSED lapl_id) |