summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-10-21 17:08:26 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-10-21 17:08:26 (GMT)
commitb33a2e7dfe76a2947c12462adb40c88af9c92e75 (patch)
tree0eed4b85b7088b8c4e357804802627ff61fdc887 /examples
parent46c5b059f1a7c434bff7b04f56f74de84a41edd2 (diff)
downloadhdf5-b33a2e7dfe76a2947c12462adb40c88af9c92e75.zip
hdf5-b33a2e7dfe76a2947c12462adb40c88af9c92e75.tar.gz
hdf5-b33a2e7dfe76a2947c12462adb40c88af9c92e75.tar.bz2
Fixed warnings in the VOL example and run it from the script.
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_vol_external_log_native.c16
-rw-r--r--examples/run-c-ex.sh.in4
2 files changed, 11 insertions, 9 deletions
diff --git a/examples/h5_vol_external_log_native.c b/examples/h5_vol_external_log_native.c
index a25be6d..d6e44db 100644
--- a/examples/h5_vol_external_log_native.c
+++ b/examples/h5_vol_external_log_native.c
@@ -131,7 +131,7 @@ visit_cb(hid_t oid, const char *name,
if(H5Iget_type(oid) == H5I_GROUP) {
len = H5VLget_driver_name(oid, n, 50);
- printf ("Visiting GROUP VOL name = %s %d\n", n, len);
+ printf ("Visiting GROUP VOL name = %s %zd\n", n, len);
}
if(H5Iget_type(oid) == H5I_DATASET)
printf("visiting dataset\n");
@@ -184,29 +184,29 @@ int main(int argc, char **argv) {
file_id = H5Fcreate(file_name, H5F_ACC_TRUNC, H5P_DEFAULT, acc_tpl);
len = H5VLget_driver_name(file_id, name, 25);
- printf ("FILE VOL name = %s %d\n", name, len);
+ printf ("FILE VOL name = %s %zd\n", name, len);
group_id = H5Gcreate2(file_id, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_driver_name(group_id, name, 50);
- printf ("GROUP VOL name = %s %d\n", name, len);
+ printf ("GROUP VOL name = %s %zd\n", name, len);
int_id = H5Tcopy(H5T_NATIVE_INT);
H5Tcommit2(file_id, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT COMMIT name = %s %d\n", name, len);
+ printf ("DT COMMIT name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Topen2(file_id, "int", H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT OPEN name = %s %d\n", name, len);
+ printf ("DT OPEN name = %s %zd\n", name, len);
H5Tclose(int_id);
int_id = H5Oopen(file_id,"int",H5P_DEFAULT);
len = H5VLget_driver_name(int_id, name, 50);
- printf ("DT OOPEN name = %s %d\n", name, len);
+ printf ("DT OOPEN name = %s %zd\n", name, len);
len = H5Fget_name(file_id, name, 50);
- printf("name = %d %s\n", len, name);
+ printf("name = %zd %s\n", len, name);
data = malloc (sizeof(int)*nelem);
for(i=0;i<nelem;++i)
@@ -221,7 +221,7 @@ int main(int argc, char **argv) {
H5Sclose(dataspaceId);
len = H5VLget_driver_name(datasetId, name, 50);
- printf ("DSET name = %s %d\n", name, len);
+ printf ("DSET name = %s %zd\n", name, len);
H5Dwrite(datasetId, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
H5Dclose(datasetId);
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index 209cdd7..6ff2e9a 100644
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -139,7 +139,9 @@ then
RunTest h5_vds-percival-unlim-maxmin&&\
rm h5_vds-percival-unlim-maxmin &&\
RunTest h5_vds &&\
- rm h5_vds); then
+ rm h5_vds &&\
+ RunTest h5_vol_external_log_native &&\
+ rm h5_vol_external_log_native); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}