diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-09-06 19:09:07 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-09-06 19:09:07 (GMT) |
commit | 38e0563a6e2bf77c860abb0ec61aa6a9da4204af (patch) | |
tree | ac2b12c47f4d66885efa0c5ae76ea0f0609b9078 /tools/h5dump | |
parent | ad7d03103deb0da4c12db131079088cb3446756d (diff) | |
download | hdf5-38e0563a6e2bf77c860abb0ec61aa6a9da4204af.zip hdf5-38e0563a6e2bf77c860abb0ec61aa6a9da4204af.tar.gz hdf5-38e0563a6e2bf77c860abb0ec61aa6a9da4204af.tar.bz2 |
[svn-r24112] Description:
Bring r24101 & 24111 from trunk to 1.8 branch:
r24101:
=======
Description:
Clean up warnings, enable new compiler warning flag(s) and bring back
changes from Coverity branch:
r20813:
Remove the dead code as listed for coverity bug #1722. h5committested.
r20814:
Issue 69: Check return value and throw error if negative return. Also free datatype id on error
r20815:
Use HDstrncpy. --gh
r20816:
Replaced one last HDstrcat call with HDstrncat to resolve coverity issue 832.
r20817:
Use HDstrncpy and HDstrncat. --gh
r20818:
Purpose: Fix valgrind issues with h5jam
Description:
Modified h5jam to free strings strdup'd in parse_command_line before exit. Note
that they may still not be freed in case of error, due to the widespread use of
exit().
r20819:
Issue 80: change loop to use int as loop index.
r20820:
Maintenance: Fixed the bug found by coverity CID 788
There were two problems with this function:
1) it tried to unnecessary free NULL pointer
2) it tried to allocate c_name buffer that is done by H5Pget_class_name
r24111:
=======
Description:
Restrict GCC diagnostic pragmas to only gcc 4.6+
Tested on:
Mac OSX 10.8.4 (amazon) w/gcc 4.8.1, C++ & FORTRAN
(too minor to require h5committest)
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump_defines.h | 2 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/h5dump/h5dump_defines.h b/tools/h5dump/h5dump_defines.h index 66d73e3..5f2df43 100644 --- a/tools/h5dump/h5dump_defines.h +++ b/tools/h5dump/h5dump_defines.h @@ -25,7 +25,7 @@ /* Macros for displaying objects */ #define begin_obj(obj,name,begin) \ do { \ - if (name) \ + if ((name)) \ PRINTSTREAM(rawoutstream, "%s \"%s\" %s", (obj), (name), (begin)); \ else \ PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \ diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index dc4211e..884670e 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -3830,7 +3830,7 @@ static void write_attr_in(hid_t loc_id, /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1]={2}; - char buf1[2][2]= {"ab","de"}; /* string */ + char buf1[2][3]= {"ab","de"}; /* string */ char buf2[2]= {1,2}; /* bitfield, opaque */ s_t buf3[2]= {{1,2},{3,4}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -3842,7 +3842,7 @@ static void write_attr_in(hid_t loc_id, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2]={3,2}; - char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf12[6][3]= {"ab","cd","ef","gh","ij","kl"}; /* string */ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -3853,7 +3853,7 @@ static void write_attr_in(hid_t loc_id, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3]={4,3,2}; - char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", + char buf13[24][3]= {"ab","cd","ef","gh","ij","kl","mn","pq", "rs","tu","vw","xz","AB","CD","EF","GH", "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ char buf23[4][3][2]; /* bitfield, opaque */ @@ -4272,7 +4272,7 @@ static void write_dset_in(hid_t loc_id, /* create 1D attributes with dimension [2], 2 elements */ hsize_t dims[1]={2}; - char buf1[2][2]= {"ab","de"}; /* string */ + char buf1[2][3]= {"ab","de"}; /* string */ char buf2[2]= {1,2}; /* bitfield, opaque */ s_t buf3[2]= {{1,2},{3,4}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ @@ -4284,7 +4284,7 @@ static void write_dset_in(hid_t loc_id, /* create 2D attributes with dimension [3][2], 6 elements */ hsize_t dims2[2]={3,2}; - char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */ + char buf12[6][3]= {"ab","cd","ef","gh","ij","kl"}; /* string */ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ @@ -4295,7 +4295,7 @@ static void write_dset_in(hid_t loc_id, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3]={4,3,2}; - char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq", + char buf13[24][3]= {"ab","cd","ef","gh","ij","kl","mn","pq", "rs","tu","vw","xz","AB","CD","EF","GH", "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */ char buf23[4][3][2]; /* bitfield, opaque */ |