From 5a9a9e8f0ee8bee687c99bcc3a1b2414e10a9ba7 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Wed, 23 Mar 2016 12:42:06 -0500 Subject: [svn-r29534] Normalization w/ revise_chunks in preparation for big merge. tools directory Also fixes a minor Java test output error. Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1 autotools serial w/ Java, Fortran, & C++ --- config/cmake/jrunTest.cmake | 8 ++++---- tools/Makefile.am | 2 +- tools/h5copy/h5copygentest.c | 2 +- tools/h5repack/h5repack_main.c | 2 +- tools/h5stat/h5stat_gentest.c | 8 ++++++-- tools/lib/h5tools.h | 2 +- tools/lib/h5tools_str.c | 3 +++ 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake index 6c9bbdd..7a92867 100644 --- a/config/cmake/jrunTest.cmake +++ b/config/cmake/jrunTest.cmake @@ -72,9 +72,9 @@ endif (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) if (TEST_MASK_ERROR) if (NOT TEST_ERRREF) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - else (NOT TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + else (NOT TEST_ERRREF) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif (NOT TEST_ERRREF) string (REGEX REPLACE "Time:[^\n]+\n" "Time: XXXX\n" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") @@ -85,9 +85,9 @@ if (TEST_MASK_ERROR) string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") if (NOT TEST_ERRREF) - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") - else (NOT TEST_ERRREF) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + else (NOT TEST_ERRREF) + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") endif (NOT TEST_ERRREF) endif (TEST_MASK_ERROR) diff --git a/tools/Makefile.am b/tools/Makefile.am index 095cc30..38e853d 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -25,6 +25,6 @@ CONFIG=ordered # All subdirectories SUBDIRS=lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat \ - perform + perform include $(top_srcdir)/config/conclude.am diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c index 49204f5..e4704ed 100644 --- a/tools/h5copy/h5copygentest.c +++ b/tools/h5copy/h5copygentest.c @@ -644,7 +644,7 @@ out: *------------------------------------------------------------------------*/ static void Test_Obj_Copy(void) { - hid_t fid=0; + hid_t fid = -1; /* File id */ /* Create source file */ fid = H5Fcreate(HDF_FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index c56e3ce..4361efe 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -360,7 +360,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) { has_i_o = 1; break; - /* -o for backward compability */ + /* -o for backward compability */ case 'o': outfile = opt_arg; has_i_o = 1; diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c index 100f5b2..ad7d093 100644 --- a/tools/h5stat/h5stat_gentest.c +++ b/tools/h5stat/h5stat_gentest.c @@ -43,7 +43,6 @@ /* * Generate HDF5 file with latest format with * NUM_GRPS groups and NUM_ATTRS attributes for the dataset - * */ static void gen_newgrat_file(const char *fname) @@ -111,6 +110,10 @@ gen_newgrat_file(const char *fname) } /* end for */ /* Close dataset, dataspace, datatype, file */ + if(H5Pclose(fapl) < 0) + goto error; + if(H5Pclose(fcpl) < 0) + goto error; if(H5Dclose(did) < 0) goto error; if(H5Sclose(sid) < 0) @@ -122,6 +125,8 @@ gen_newgrat_file(const char *fname) error: H5E_BEGIN_TRY { + H5Pclose(fapl); + H5Pclose(fcpl); H5Aclose(attr_id); H5Dclose(did); H5Tclose(tid); @@ -129,7 +134,6 @@ error: H5Gclose(gid); H5Fclose(fid); } H5E_END_TRY; - } /* gen_newgrat_file() */ /* diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index d2e3ea6..cec3b9d 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -510,7 +510,7 @@ typedef struct h5tools_context_t { hsize_t size_last_dim; /*the size of the last dimension, *needed so we can break after each *row */ - int indent_level; /*the number of times we need some + int indent_level; /*the number of times we need some *extra indentation */ int default_indent_level; /*this is used when the indent level gets changed */ hsize_t acc[H5S_MAX_RANK]; /* accumulator position */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index bdb82a4..13c6a20 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -267,6 +267,9 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt) { char _temp[1024], *temp = _temp; + HDassert(str); + HDassert(fmt); + /* If the format string is simply "%s" then don't bother doing anything */ if (!HDstrcmp(fmt, "%s")) return str->s; -- cgit v0.12