diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1999-11-17 22:00:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1999-11-17 22:00:15 (GMT) |
commit | 9648d22f5f387640de8140acd7d2193bcd6770ad (patch) | |
tree | 20905fda3ba2ecf9259c0cc9c4ef0658a79ad903 /tools/h5dumptst.c | |
parent | 9e014467b62df66322de63e21be565ed59a079b3 (diff) | |
download | hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.zip hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.tar.gz hdf5-9648d22f5f387640de8140acd7d2193bcd6770ad.tar.bz2 |
[svn-r1837] Cleaned up a few warnings from the SGI compiler.
Diffstat (limited to 'tools/h5dumptst.c')
-rw-r--r-- | tools/h5dumptst.c | 80 |
1 files changed, 38 insertions, 42 deletions
diff --git a/tools/h5dumptst.c b/tools/h5dumptst.c index bededf5..e2c9bf7 100644 --- a/tools/h5dumptst.c +++ b/tools/h5dumptst.c @@ -248,15 +248,14 @@ int point = 100; static void test_softlink(void) { hid_t fid, root; -herr_t status; fid = H5Fcreate(FILE4, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); root = H5Gopen (fid, "/"); - status = H5Glink (root, H5G_LINK_SOFT, "somevalue", "slink1"); + H5Glink (root, H5G_LINK_SOFT, "somevalue", "slink1"); - status = H5Glink (root, H5G_LINK_SOFT, "linkvalue", "slink2"); + H5Glink (root, H5G_LINK_SOFT, "linkvalue", "slink2"); H5Gclose(root); @@ -1018,7 +1017,7 @@ const int perm[4] = {0,1,2,3}; /* the 0'th and the 3'rd indices are permuted */ H5Fclose(fid); } -static hid_t mkstr(int size, int pad) { +static hid_t mkstr(int size, H5T_str_t pad) { hid_t type; if ((type=H5Tcopy(H5T_C_S1))<0) return -1; @@ -1363,8 +1362,6 @@ void test_objref(void){ uint32_t *tu32; /* Temporary pointer to uint32 data */ intn i; /* counting variables */ const char *write_comment="Foo!"; /* Comments for group */ - herr_t ret; /* Generic return value */ - /* Allocate write & read buffers */ wbuf=malloc(sizeof(hobj_ref_t)*SPACE1_DIM1); @@ -1381,7 +1378,7 @@ void test_objref(void){ group=H5Gcreate(fid1,"Group1",-1); /* Set group's comment */ - ret=H5Gset_comment(group,".",write_comment); + H5Gset_comment(group,".",write_comment); /* Create a dataset (inside Group1) */ dataset=H5Dcreate(group,"Dataset1",H5T_STD_U32BE,sid1,H5P_DEFAULT); @@ -1390,72 +1387,72 @@ void test_objref(void){ *tu32++=i*3; /* Write selection to disk */ - ret=H5Dwrite(dataset,H5T_NATIVE_UINT,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); + H5Dwrite(dataset,H5T_NATIVE_UINT,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); /* Close Dataset */ - ret = H5Dclose(dataset); + H5Dclose(dataset); /* Create another dataset (inside Group1) */ dataset=H5Dcreate(group,"Dataset2",H5T_STD_U8BE,sid1,H5P_DEFAULT); /* Close Dataset */ - ret = H5Dclose(dataset); + H5Dclose(dataset); /* Create a datatype to refer to */ tid1 = H5Tcreate (H5T_COMPOUND, sizeof(s1_t)); /* Insert fields */ - ret=H5Tinsert (tid1, "a", HOFFSET(s1_t,a), H5T_STD_I32BE); + H5Tinsert (tid1, "a", HOFFSET(s1_t,a), H5T_STD_I32BE); - ret=H5Tinsert (tid1, "b", HOFFSET(s1_t,b), H5T_IEEE_F32BE); + H5Tinsert (tid1, "b", HOFFSET(s1_t,b), H5T_IEEE_F32BE); - ret=H5Tinsert (tid1, "c", HOFFSET(s1_t,c), H5T_IEEE_F32BE); + H5Tinsert (tid1, "c", HOFFSET(s1_t,c), H5T_IEEE_F32BE); /* Save datatype for later */ - ret=H5Tcommit (group, "Datatype1", tid1); + H5Tcommit (group, "Datatype1", tid1); /* Close datatype */ - ret = H5Tclose(tid1); + H5Tclose(tid1); /* Close group */ - ret = H5Gclose(group); + H5Gclose(group); /* Create a dataset */ dataset=H5Dcreate(fid1,"Dataset3",H5T_STD_REF_OBJ,sid1,H5P_DEFAULT); /* Create reference to dataset */ - ret = H5Rcreate(&wbuf[0],fid1,"/Group1/Dataset1",H5R_OBJECT,-1); - ret = H5Rget_object_type(dataset,&wbuf[0]); + H5Rcreate(&wbuf[0],fid1,"/Group1/Dataset1",H5R_OBJECT,-1); + H5Rget_object_type(dataset,&wbuf[0]); /* Create reference to dataset */ - ret = H5Rcreate(&wbuf[1],fid1,"/Group1/Dataset2",H5R_OBJECT,-1); + H5Rcreate(&wbuf[1],fid1,"/Group1/Dataset2",H5R_OBJECT,-1); - ret = H5Rget_object_type(dataset,&wbuf[1]); + H5Rget_object_type(dataset,&wbuf[1]); /* Create reference to group */ - ret = H5Rcreate(&wbuf[2],fid1,"/Group1",H5R_OBJECT,-1); + H5Rcreate(&wbuf[2],fid1,"/Group1",H5R_OBJECT,-1); - ret = H5Rget_object_type(dataset,&wbuf[2]); + H5Rget_object_type(dataset,&wbuf[2]); /* Create reference to named datatype */ - ret = H5Rcreate(&wbuf[3],fid1,"/Group1/Datatype1",H5R_OBJECT,-1); + H5Rcreate(&wbuf[3],fid1,"/Group1/Datatype1",H5R_OBJECT,-1); - ret = H5Rget_object_type(dataset,&wbuf[3]); + H5Rget_object_type(dataset,&wbuf[3]); /* Write selection to disk */ - ret=H5Dwrite(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); + H5Dwrite(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); /* Close disk dataspace */ - ret = H5Sclose(sid1); + H5Sclose(sid1); /* Close Dataset */ - ret = H5Dclose(dataset); + H5Dclose(dataset); /* Close file */ - ret = H5Fclose(fid1); + H5Fclose(fid1); /* Free memory buffers */ free(wbuf); @@ -1487,7 +1484,6 @@ void test_datareg(void){ *drbuf; /* Buffer for reading numeric data from disk */ uint8_t *tu8; /* Temporary pointer to uint8 data */ intn i; /* counting variables */ - herr_t ret; /* Generic return value */ /* Allocate write & read buffers */ wbuf=calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1); @@ -1508,10 +1504,10 @@ void test_datareg(void){ *tu8++=i*3; /* Write selection to disk */ - ret=H5Dwrite(dset2,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,H5P_DEFAULT,dwbuf); + H5Dwrite(dset2,H5T_NATIVE_UCHAR,H5S_ALL,H5S_ALL,H5P_DEFAULT,dwbuf); /* Close Dataset */ - ret = H5Dclose(dset2); + H5Dclose(dset2); /* Create dataspace for the reference dataset */ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL); @@ -1526,12 +1522,12 @@ void test_datareg(void){ stride[0]=1; stride[1]=1; count[0]=6; count[1]=6; block[0]=1; block[1]=1; - ret = H5Sselect_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block); + H5Sselect_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block); - ret = H5Sget_select_npoints(sid2); + H5Sget_select_npoints(sid2); /* Store first dataset region */ - ret = H5Rcreate(&wbuf[0],fid1,"/Dataset2",H5R_DATASET_REGION,sid2); + H5Rcreate(&wbuf[0],fid1,"/Dataset2",H5R_DATASET_REGION,sid2); /* Select sequence of ten points for second reference */ coord1[0][0]=6; coord1[0][1]=9; @@ -1544,27 +1540,27 @@ void test_datareg(void){ coord1[7][0]=9; coord1[7][1]=0; coord1[8][0]=7; coord1[8][1]=1; coord1[9][0]=3; coord1[9][1]=3; - ret = H5Sselect_elements(sid2,H5S_SELECT_SET,POINT1_NPOINTS,(const hssize_t **)coord1); + H5Sselect_elements(sid2,H5S_SELECT_SET,POINT1_NPOINTS,(const hssize_t **)coord1); - ret = H5Sget_select_npoints(sid2); + H5Sget_select_npoints(sid2); /* Store second dataset region */ - ret = H5Rcreate(&wbuf[1],fid1,"/Dataset2",H5R_DATASET_REGION,sid2); + H5Rcreate(&wbuf[1],fid1,"/Dataset2",H5R_DATASET_REGION,sid2); /* Write selection to disk */ - ret=H5Dwrite(dset1,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); + H5Dwrite(dset1,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf); /* Close disk dataspace */ - ret = H5Sclose(sid1); + H5Sclose(sid1); /* Close Dataset */ - ret = H5Dclose(dset1); + H5Dclose(dset1); /* Close uint8 dataset dataspace */ - ret = H5Sclose(sid2); + H5Sclose(sid2); /* Close file */ - ret = H5Fclose(fid1); + H5Fclose(fid1); /* Free memory buffers */ free(wbuf); |