summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
commitd09b08ce39f96d70f1d68a9f2e0313495c784619 (patch)
tree63ba039519b469adb1fffd30261079ae0dcf93f1 /test/dsets.c
parent0343b61666f105ca865dcbc0cbcff87f43f5e489 (diff)
downloadhdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.zip
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.gz
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.bz2
[svn-r8384] Purpose:
Code cleanup Description: Clean up lots of warnings based on those reported from the SGI compilers as well as gcc. Platforms tested: SGI O3900, IRIX64 6.5 (Cheryl's SGI machine) FreeBSD 4.9 (sleipnir) w/ & w/o parallel h5committest
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 3862f84..176f64e 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -1425,7 +1425,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]/2; j++) {
- points[i][j] = HDrandom ();
+ points[i][j] = (int)HDrandom ();
}
}
if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, points)<0)
@@ -1531,7 +1531,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = HDrandom();
+ points[hs_offset[0]+i][hs_offset[1]+j] = (int)HDrandom();
}
}
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
@@ -2159,7 +2159,7 @@ test_onebyte_shuffle(hid_t file)
for (i= 0;i< 10; i++)
for (j = 0; j < 20; j++)
- orig_data[i][j] = HDrandom();
+ orig_data[i][j] = (unsigned char)HDrandom();
PASSED();
#else
@@ -3124,10 +3124,9 @@ static herr_t
auxread_fdata(hid_t fid, const char *name)
{
hid_t dset_id; /* dataset ID */
- hid_t dcpl_id; /* dataset creation property list ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t space_id=(-1); /* space ID */
+ hid_t ftype_id=(-1); /* file data type ID */
+ hid_t mtype_id=(-1); /* memory data type ID */
size_t msize; /* memory size of memory type */
void *buf=NULL; /* data buffer */
hsize_t nelmts; /* number of elements in dataset */
@@ -3141,8 +3140,6 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
if ((ftype_id=H5Dget_type (dset_id))<0)
goto error;
- if ((dcpl_id=H5Dget_create_plist(dset_id))<0)
- goto error;
if ( (rank=H5Sget_simple_extent_ndims(space_id))<0)
goto error;
HDmemset(dims, 0, sizeof dims);
@@ -3167,8 +3164,6 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
}
- if (H5Pclose(dcpl_id)<0)
- goto error;
if (H5Sclose(space_id)<0)
goto error;
if (H5Dclose(dset_id)<0)
@@ -3180,7 +3175,6 @@ auxread_fdata(hid_t fid, const char *name)
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl_id);
H5Sclose(space_id);
H5Dclose(dset_id);
H5Tclose(ftype_id);
@@ -3211,9 +3205,9 @@ static herr_t
test_filters_endianess(void)
{
hid_t fid; /* file ID */
- hid_t dsid; /* dataset ID */
+ hid_t dsid=(-1); /* dataset ID */
hid_t sid; /* dataspace ID */
- hid_t dcpl; /* dataset creation property list ID */
+ hid_t dcpl=(-1); /* dataset creation property list ID */
hsize_t dims[1]={2}; /* dataspace dimensions */
hsize_t chunk_dims[1]={2}; /* chunk dimensions */
int buf[2];
@@ -3352,7 +3346,7 @@ main(void)
#endif
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {