summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5dump/h5dumpgentest.c24
-rw-r--r--tools/test/h5repack/h5repacktst.c12
-rw-r--r--tools/test/perform/chunk_cache.c24
3 files changed, 25 insertions, 35 deletions
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 946ca04..3a414d1 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -1889,7 +1889,7 @@ static void gent_str2(void)
int i;
- char buf[LENSTR+10];
+ char buf[LENSTR+20];
char buf2[3*LENSTR2];
hsize_t sdim;
@@ -1941,7 +1941,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1954,7 +1954,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1974,7 +1974,7 @@ static void gent_str2(void)
for(i = 0;(hsize_t) i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1988,7 +1988,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2007,7 +2007,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2021,7 +2021,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -7532,16 +7532,6 @@ gent_nodata(void)
{
hid_t fid, dataset, space;
hsize_t dims[2];
- uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits;
- uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits;
- uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits;
- uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits;
- int8_t dset8[F66_XDIM][F66_YDIM8], val8bits;
- int16_t dset16[F66_XDIM][F66_YDIM16], val16bits;
- int32_t dset32[F66_XDIM][F66_YDIM32], val32bits;
- int64_t dset64[F66_XDIM][F66_YDIM64], val64bits;
- double dsetdbl[F66_XDIM][F66_YDIM8];
- unsigned int i, j;
fid = H5Fcreate(FILE87, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 0ae570b..a89bf10 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -2907,10 +2907,10 @@ out:
static
int make_all_filters(hid_t loc_id)
{
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hid_t dtid;
- hid_t dsid;
+ hid_t dcpl = H5I_INVALID_HID; /* dataset creation property list */
+ hid_t sid = H5I_INVALID_HID; /* dataspace ID */
+ hid_t dtid = H5I_INVALID_HID;
+ hid_t dsid = H5I_INVALID_HID;
#if defined (H5_HAVE_FILTER_SZIP)
unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block=8;
@@ -3083,7 +3083,7 @@ int make_early(void)
hid_t tid=-1;
hid_t dcpl=-1;
int i;
- char name[10];
+ char name[16];
int iter=100;
if ((fid = H5Fcreate(FNAME5, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -3178,7 +3178,7 @@ int make_layout(hid_t loc_id)
hsize_t chunk_dims[RANK]={CDIM1,CDIM2};
int buf[DIM1][DIM2];
int i, j, n;
- char name[6];
+ char name[16];
for (i=n=0; i<DIM1; i++)
diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c
index 429f70a..47734b6 100644
--- a/tools/test/perform/chunk_cache.c
+++ b/tools/test/perform/chunk_cache.c
@@ -106,8 +106,8 @@ cleanup (void)
*/
static int create_dset1(hid_t file)
{
- hid_t dataspace, dataset;
- hid_t dcpl;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2};
int data[DSET1_DIM1][DSET1_DIM2]; /* data for writing */
@@ -167,8 +167,8 @@ error:
*/
static int create_dset2(hid_t file)
{
- hid_t dataspace, dataset;
- hid_t dcpl;
+ hid_t dataspace = H5I_INVALID_HID, dataset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2};
hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2};
int data[DSET2_DIM1][DSET2_DIM2]; /* data for writing */
@@ -226,10 +226,10 @@ error:
*/
static int check_partial_chunks_perf(hid_t file)
{
- hid_t dataset;
- hid_t filespace;
- hid_t memspace;
- hid_t dapl;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t dapl = H5I_INVALID_HID;
int rdata[DSET1_DIM2]; /* data for reading */
int i;
@@ -297,10 +297,10 @@ error:
*/
static int check_hash_value_perf(hid_t file)
{
- hid_t dataset;
- hid_t filespace;
- hid_t memspace;
- hid_t dapl;
+ hid_t dataset = H5I_INVALID_HID;
+ hid_t filespace = H5I_INVALID_HID;
+ hid_t memspace = H5I_INVALID_HID;
+ hid_t dapl = H5I_INVALID_HID;
int rdata[DSET2_DIM1]; /* data for reading */
int i;