summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2015-11-04 17:49:19 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2015-11-04 17:49:19 (GMT)
commit11778b82333fd06e625e4c571248910d501a1fd2 (patch)
tree3ce7e216d9f56072f43ddf26a50ee9321fe907a9 /tools
parent77e6ac3324feb5d196745f31df617d568b60d975 (diff)
downloadhdf5-11778b82333fd06e625e4c571248910d501a1fd2.zip
hdf5-11778b82333fd06e625e4c571248910d501a1fd2.tar.gz
hdf5-11778b82333fd06e625e4c571248910d501a1fd2.tar.bz2
[svn-r28274] Applied patch to eliminate warnings from PRINTSTREAM macros from HDF5 1.8.16.
Update supported platform and tested configuration info in RELEASE.txt. Tested with h5committest.new.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump_ddl.c6
-rw-r--r--tools/h5dump/h5dump_defines.h31
-rw-r--r--tools/h5ls/h5ls.c3
-rw-r--r--tools/lib/h5tools.h8
-rw-r--r--tools/lib/h5tools_utils.c3
5 files changed, 29 insertions, 22 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index 11052fb..43d397c 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -1269,8 +1269,9 @@ dump_fcontents(hid_t fid)
unsigned u;
for (u = 0; u < type_table->nobjs; u++) {
- if (!type_table->objs[u].recorded)
+ if (!type_table->objs[u].recorded) {
PRINTSTREAM(rawoutstream, " %-10s /#"H5_PRINTF_HADDR_FMT"\n", "datatype", type_table->objs[u].objno);
+ }
}
}
@@ -1874,8 +1875,9 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT
begin_obj(h5tools_dump_header_format->softlinkbegin, links, h5tools_dump_header_format->softlinkblockbegin);
PRINTVALSTREAM(rawoutstream, "\n");
indentation(COL);
- if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0)
+ if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0) {
PRINTSTREAM(rawoutstream, "LINKTARGET \"%s\"\n", buf);
+ }
else {
error_msg("h5dump error: unable to get link value for \"%s\"\n", links);
h5tools_setstatus(EXIT_FAILURE);
diff --git a/tools/h5dump/h5dump_defines.h b/tools/h5dump/h5dump_defines.h
index 5f2df43..f1c4451 100644
--- a/tools/h5dump/h5dump_defines.h
+++ b/tools/h5dump/h5dump_defines.h
@@ -23,23 +23,26 @@
#define COL 3
/* Macros for displaying objects */
-#define begin_obj(obj,name,begin) \
- do { \
- if ((name)) \
+#define begin_obj(obj,name,begin) \
+ do { \
+ if ((name)) { \
PRINTSTREAM(rawoutstream, "%s \"%s\" %s", (obj), (name), (begin)); \
- else \
- PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \
+ } else { \
+ PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \
+ } \
} while(0);
-#define end_obj(obj,end) \
- do { \
- if(HDstrlen(end)) { \
- PRINTSTREAM(rawoutstream, "%s", end); \
- if(HDstrlen(obj)) \
- PRINTVALSTREAM(rawoutstream, " "); \
- } \
- if(HDstrlen(obj)) \
- PRINTSTREAM(rawoutstream, "%s", obj); \
+#define end_obj(obj,end) \
+ do { \
+ if(HDstrlen(end)) { \
+ PRINTSTREAM(rawoutstream, "%s", end); \
+ if(HDstrlen(obj)) { \
+ PRINTVALSTREAM(rawoutstream, " "); \
+ } \
+ } \
+ if(HDstrlen(obj)) { \
+ PRINTSTREAM(rawoutstream, "%s", obj); \
+ } \
} while(0);
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 4afb329..708e9de 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -2794,8 +2794,9 @@ main(int argc, const char *argv[])
file = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, preferred_driver, drivername, sizeof drivername);
if(file >= 0) {
- if(verbose_g)
+ if(verbose_g) {
PRINTSTREAM(rawoutstream, "Opened \"%s\" with %s driver.\n", fname, drivername);
+ }
break; /*success*/
} /* end if */
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index d6c3720..5c08f33 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -37,10 +37,10 @@
#define H5TOOLS_DUMP_MAX_RANK H5S_MAX_RANK
/* Stream macros */
-#define FLUSHSTREAM(S) if(S != NULL) HDfflush(S)
-#define PRINTSTREAM(S, F, ...) if(S != NULL) HDfprintf(S, F, __VA_ARGS__)
-#define PRINTVALSTREAM(S, V) if(S != NULL) HDfprintf(S, V)
-#define PUTSTREAM(X,S) if(S != NULL) HDfputs(X, S);
+#define FLUSHSTREAM(S) {if(S != NULL) HDfflush(S);}
+#define PRINTSTREAM(S, F, ...) {if(S != NULL) HDfprintf(S, F, __VA_ARGS__);}
+#define PRINTVALSTREAM(S, V) {if(S != NULL) HDfprintf(S, V);}
+#define PUTSTREAM(X,S) {if(S != NULL) HDfputs(X, S);}
/*
* Strings for output - these were duplicated from the h5dump.h
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fc8cf1d..572090b 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -482,10 +482,11 @@ dump_table(char* tablename, table_t *table)
unsigned u;
PRINTSTREAM(rawoutstream,"%s: # of entries = %d\n", tablename,table->nobjs);
- for (u = 0; u < table->nobjs; u++)
+ for (u = 0; u < table->nobjs; u++) {
PRINTSTREAM(rawoutstream,"%a %s %d %d\n", table->objs[u].objno,
table->objs[u].objname,
table->objs[u].displayed, table->objs[u].recorded);
+ }
}