summaryrefslogtreecommitdiffstats
path: root/test/tfile.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-08-31 19:04:23 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-08-31 19:04:23 (GMT)
commitc226e58005f54b29dc9fc5f762f7aa6382e790ff (patch)
treefa288e15e01237434f2193d99bc21bb50963b12f /test/tfile.c
parente6f9fc5f7f58e4c0a9a8541bc5674b440abd658c (diff)
downloadhdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.zip
hdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.tar.gz
hdf5-c226e58005f54b29dc9fc5f762f7aa6382e790ff.tar.bz2
[svn-r27626] Various minor warning fixes before major SWMR and VDS merges.
gcc 4.9.2 was used to create the warning list - implicit casts - shadowed variables - various enum issues - other minor fixes (comments, unused macros, etc.) Tested on: h5committest
Diffstat (limited to 'test/tfile.c')
-rw-r--r--test/tfile.c110
1 files changed, 63 insertions, 47 deletions
diff --git a/test/tfile.c b/test/tfile.c
index 4913a15..33c947f 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -827,7 +827,9 @@ test_file_close(void)
ret = H5Gclose(group_id3);
CHECK(ret, FAIL, "H5Gclose");
break;
- default:
+
+ case H5F_CLOSE_DEFAULT:
+ default:
CHECK(fc_degree, H5F_CLOSE_DEFAULT, "H5Pget_fclose_degree");
break;
}
@@ -1314,6 +1316,19 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
VERIFY(oid_list[i], did, "H5Fget_obj_ids");
break;
+ case H5I_UNINIT:
+ case H5I_BADID:
+ case H5I_DATATYPE:
+ case H5I_DATASPACE:
+ case H5I_ATTR:
+ case H5I_REFERENCE:
+ case H5I_VFL:
+ case H5I_GENPROP_CLS:
+ case H5I_GENPROP_LST:
+ case H5I_ERROR_CLASS:
+ case H5I_ERROR_MSG:
+ case H5I_ERROR_STACK:
+ case H5I_NTYPES:
default:
ERROR("H5Fget_obj_ids");
} /* end switch */
@@ -3079,67 +3094,68 @@ test_filespace_info(void)
my_fapl = fapl;
} /* end else */
- /* Test with different sized free space section threshold */
- for(fs_size = 0; fs_size <= TEST_THRESHOLD10; fs_size++) {
+ /* Test with different sized free space section threshold */
+ for(fs_size = 0; fs_size <= TEST_THRESHOLD10; fs_size++) {
- /* Test with different file space handling strategies */
- for(fs_type = 0; fs_type < H5F_FILE_SPACE_NTYPES; H5_INC_ENUM(H5F_file_space_type_t, fs_type)) {
+ /* Test with different file space handling strategies */
+ for(fs_type = H5F_FILE_SPACE_DEFAULT; fs_type < H5F_FILE_SPACE_NTYPES; H5_INC_ENUM(H5F_file_space_type_t, fs_type)) {
- /* Get a copy of the default file creation property */
- fcpl1 = H5Pcopy(fcpl);
- CHECK(fcpl1, FAIL, "H5Pcopy");
+ /* Get a copy of the default file creation property */
+ fcpl1 = H5Pcopy(fcpl);
+ CHECK(fcpl1, FAIL, "H5Pcopy");
- /* Set file space strategy and free space section threshold */
- ret = H5Pset_file_space(fcpl1, fs_type, fs_size);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Set file space strategy and free space section threshold */
+ ret = H5Pset_file_space(fcpl1, fs_type, fs_size);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- /* Get the file space info from the creation property */
- ret = H5Pget_file_space(fcpl1, &strategy, &threshold);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Get the file space info from the creation property */
+ ret = H5Pget_file_space(fcpl1, &strategy, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- /* A 0 value for strategy retains existing strategy in use */
- VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
- /* A 0 value for threshold retains existing threshold in use */
- VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
+ /* A 0 value for strategy retains existing strategy in use */
+ VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
+ /* A 0 value for threshold retains existing threshold in use */
+ VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
- /* Create the file with the specified file space info */
- fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
- CHECK(ret, FAIL, "H5Fcreate");
+ /* Create the file with the specified file space info */
+ fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
+ CHECK(ret, FAIL, "H5Fcreate");
- /* Close the file */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Re-open the file */
- fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
- CHECK(ret, FAIL, "H5Fopen");
+ /* Re-open the file */
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
+ CHECK(ret, FAIL, "H5Fopen");
- /* Get the file's creation property */
- fcpl2 = H5Fget_create_plist(fid2);
- CHECK(fcpl2, FAIL, "H5Fget_create_plist");
+ /* Get the file's creation property */
+ fcpl2 = H5Fget_create_plist(fid2);
+ CHECK(fcpl2, FAIL, "H5Fget_create_plist");
- strategy = threshold = 0;
+ strategy = H5F_FILE_SPACE_DEFAULT;
+ threshold = 0;
- /* Get the file space info from the creation property list */
- ret = H5Pget_file_space(fcpl2, &strategy, &threshold);
- CHECK(ret, FAIL, "H5Pget_file_space");
+ /* Get the file space info from the creation property list */
+ ret = H5Pget_file_space(fcpl2, &strategy, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space");
- VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
- VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
+ VERIFY(strategy, (H5F_file_space_type_t)(fs_type ? fs_type : def_type), "H5Pget_file_space");
+ VERIFY(threshold, (hsize_t)(fs_size ? fs_size : def_size), "H5Pget_file_space");
- /* Close the file */
- ret = H5Fclose(fid2);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the file */
+ ret = H5Fclose(fid2);
+ CHECK(ret, FAIL, "H5Fclose");
- /* Release file-creation template */
- ret = H5Pclose(fcpl1);
- CHECK(ret, FAIL, "H5Pclose");
- ret = H5Pclose(fcpl2);
- CHECK(ret, FAIL, "H5Pclose");
- } /* end for file space strategy type */
- } /* end for free space threshold */
+ /* Release file-creation template */
+ ret = H5Pclose(fcpl1);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Pclose(fcpl2);
+ CHECK(ret, FAIL, "H5Pclose");
+ } /* end for file space strategy type */
+ } /* end for free space threshold */
- h5_cleanup(FILESPACE_NAME, my_fapl);
+ h5_cleanup(FILESPACE_NAME, my_fapl);
} /* end for new/old format */