summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-05-25 12:42:18 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-05-25 12:42:18 (GMT)
commit18ae45027c40ecf539260216a04ba1cfdf8b50d9 (patch)
tree706eda14b2f94705ac3d4e9d97608dc69c813582 /tools
parent946fd98b8d5b653b89cfdce279195810f389dedf (diff)
downloadhdf5-18ae45027c40ecf539260216a04ba1cfdf8b50d9.zip
hdf5-18ae45027c40ecf539260216a04ba1cfdf8b50d9.tar.gz
hdf5-18ae45027c40ecf539260216a04ba1cfdf8b50d9.tar.bz2
Fixed additional minor warnings.
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5copy/h5copygentest.c2
-rw-r--r--tools/test/h5diff/h5diffgentest.c41
-rw-r--r--tools/test/h5dump/h5dumpgentest.c2
-rw-r--r--tools/test/h5repack/h5repacktst.c2
4 files changed, 22 insertions, 25 deletions
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index bda0686..d4d6a08 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -336,7 +336,7 @@ static void gent_att_compound_vlstr(hid_t loc_id)
{
typedef struct { /* Compound structure for the attribute */
int i;
- char *v;
+ const char *v;
} s1;
hsize_t dim[1] = {1}; /* Dimension size */
hid_t sid = -1; /* Dataspace ID */
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index 708f371..459a37e 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -3632,8 +3632,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
char *str_vlen_repeat; /* vlen string */
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
} comp1_t;
@@ -3645,9 +3645,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
char *str_vlen_repeat; /* vlen string */
char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
} comp2_t;
@@ -3660,8 +3660,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
char *str_vlen_repeat; /* vlen string */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
} comp3_t;
/* compound4 datatype */
@@ -3672,16 +3672,16 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */
char *str_vlen_repeat; /* vlen string */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
} comp4_t;
/* compound5 datatype */
typedef struct comp5_t
{
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char *str_vlen; /* vlen string */
@@ -3693,9 +3693,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
/* compound6 datatype */
typedef struct comp6_t
{
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char *str_vlen; /* vlen string */
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
@@ -3708,8 +3708,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
{
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */
char *str_vlen; /* vlen string */
@@ -3720,9 +3720,9 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
typedef struct comp8_t
{
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
char *str_vlen; /* vlen string */
char str_fixlen_repeat[FIXLEN_STR_SIZE]; /* fixed len string */
@@ -3734,8 +3734,8 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
{
char str_array_fixlen[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
char str_fixlen_array_again[FIXLEN_STR_ARRY_DIM][FIXLEN_STR_ARRY_SIZE]; /* fixed len string array */
- char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
- char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_array_vlen[VLEN_STR_ARRY_DIM]; /* vlen string array */
+ const char *str_vlen_array_again[VLEN_STR_ARRY_DIM]; /* vlen string array */
char str_fixlen[FIXLEN_STR_SIZE]; /* fixed len string */
int int_data1;
hobj_ref_t objref1; /* reference */
@@ -3768,7 +3768,7 @@ static int test_comp_vlen_strings(const char *fname1, const char *grp_name, int
hid_t sid_vlen_str_array=0; /* dataspace ID */
hid_t tid_vlen_str_array_pre=0; /* datatype ID */
hid_t tid_vlen_str_array=0; /* datatype ID */
- char *vlen_str_array_buf[VLEN_STR_ARRY_DIM]= {
+ const char *vlen_str_array_buf[VLEN_STR_ARRY_DIM]= {
"1 - Variable length string Array",
"2 - Testing variable length string array in compound type",
"3 - Four score and seven\n years ago our forefathers brought forth on this continent a new nation,"
@@ -5343,7 +5343,6 @@ static hid_t mkstr(int size, H5T_str_t pad) {
*-------------------------------------------------------------------------*/
static void test_objs_strings(const char *fname1, const char *fname2)
{
- herr_t status = SUCCEED;
hid_t fid1=0;
hid_t fid2=0;
hid_t dataset=0;
@@ -5398,7 +5397,6 @@ static void test_objs_strings(const char *fname1, const char *fname2)
if (fid1 < 0)
{
fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname1);
- status = FAIL;
goto out;
}
@@ -5407,7 +5405,6 @@ static void test_objs_strings(const char *fname1, const char *fname2)
if (fid2 < 0)
{
fprintf(stderr, "Error: %s> H5Fcreate failed.\n", fname2);
- status = FAIL;
goto out;
}
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 169eddb..55a754d 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -3479,7 +3479,7 @@ static void gent_array8(void)
unsigned int i;
/* Allocate data buffer */
- wdata = HDmalloc(F64_DIM1 * sizeof(int));
+ wdata = (int *)HDmalloc(F64_DIM1 * sizeof(int));
HDassert(wdata);
/*
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 3b82383..efce43f 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -266,7 +266,7 @@ int main (void)
fname = H5REPACK_FSPACE_FNAMES[j];
if(h5repack_init(&pack_options, 0, FALSE) < 0)
GOERROR;
- pack_options.fs_strategy = -1; /* "FSM_AGGR" specified via -S FSM_AGGR */
+ pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */
pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
if(h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;