summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2013-08-15 13:27:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2013-08-15 13:27:24 (GMT)
commitefb39881a0e4cc59799238a2c6758f41be780abc (patch)
tree35156dff6ca5f20b7cbc4e0f2e6d5c85baf02742
parent4a51e83e60336381c7bb6370ec61b97fc9194918 (diff)
downloadhdf5-efb39881a0e4cc59799238a2c6758f41be780abc.zip
hdf5-efb39881a0e4cc59799238a2c6758f41be780abc.tar.gz
hdf5-efb39881a0e4cc59799238a2c6758f41be780abc.tar.bz2
[svn-r24012] Description:
Bring r24011 from trunk to 1.8 branch: Clean up a few warnings Tested on: Mac OSX 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest)
-rw-r--r--hl/test/test_ds.c2
-rw-r--r--test/dt_arith.c4
-rw-r--r--tools/h5diff/h5diffgentest.c24
-rw-r--r--tools/h5repack/h5repack_opttable.c2
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/misc/h5repart.c2
6 files changed, 32 insertions, 4 deletions
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index ffd6793..2ea8801 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -3134,7 +3134,7 @@ static int test_simple(void)
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0)
goto out;
- if(HDstrncmp("Latitude set 0",name_out, sizeof(name_out))!=0)
+ if(HDstrncmp("Latitude set 0",name_out, name_len)!=0)
goto out;
if(name_out) {
HDfree(name_out);
diff --git a/test/dt_arith.c b/test/dt_arith.c
index e85e355..3f115cc 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -3442,6 +3442,8 @@ done:
HDexit(MIN((int)fails_all_tests, 254));
else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL)
HDexit(0);
+ HDassert(0 && "Should not reach this point!");
+ return 1;
#else
reset_hdf5();
@@ -3463,6 +3465,8 @@ error:
HDexit(MIN(MAX((int)fails_all_tests, 1), 254));
else if(run_test==TEST_DENORM || run_test==TEST_SPECIAL)
HDexit(1);
+ HDassert(0 && "Should not reach this point!");
+ return 1;
#else
reset_hdf5();
if(run_test==TEST_NOOP || run_test==TEST_NORMAL)
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 7c69154..b5e0ae6 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -4261,15 +4261,39 @@ test_enums(const char *fname)
tid = H5Tenum_create(H5T_NATIVE_INT);
enum_val = 0;
status = H5Tenum_insert(tid, "YIN", &enum_val);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
enum_val = 1;
status = H5Tenum_insert(tid, "YANG", &enum_val);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> H5Tenum_insert failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
/*-----------------------------------------------------------------------
* Create datasets containing enum data.
*---------------------------------------------------------------------*/
status = write_dset(fid, 1, &dims, "dset1", tid, data1);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
status = write_dset(fid, 1, &dims, "dset2", tid, data2);
+ if (status < 0)
+ {
+ fprintf(stderr, "Error: %s> write_dset failed.\n", fname);
+ status = FAIL;
+ goto out;
+ }
out:
/*-----------------------------------------------------------------------
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index 00e4bea..bcddbb9 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -388,7 +388,7 @@ pack_info_t* options_get_object( const char *path,
pack_opttbl_t *table )
{
unsigned int i;
- const char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */
+ char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */
for ( i = 0; i < table->nelems; i++)
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 66f87a3..c7323c3 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -75,7 +75,7 @@ static const char *drivernames[]={
/* This enum should match the entries in the above drivers_list since they
* are indexes into the drivers_list array. */
-enum {
+typedef enum {
SEC2_IDX = 0
,FAMILY_IDX
,SPLIT_IDX
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index d41dfc9..07f6bfd 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -301,7 +301,7 @@ main (int argc, char *argv[])
n = blk_size;
if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset);
if (left_overs) {
- n = (size_t)MIN (n, left_overs);
+ n = (size_t)MIN ((off_t)n, left_overs);
left_overs -= n;
need_write = FALSE;
} else if (src_offset<src_act_size) {