summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2013-08-18 00:31:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2013-08-18 00:31:01 (GMT)
commit6e58f671ec62120246a94101a80a47259ffb96c3 (patch)
tree204ba14aa8e2fad6bb78ef8128c3f98c48e26f39 /tools/h5dump
parentb5a5441e7c5eb09cb53677326c3e84f80acdf108 (diff)
downloadhdf5-6e58f671ec62120246a94101a80a47259ffb96c3.zip
hdf5-6e58f671ec62120246a94101a80a47259ffb96c3.tar.gz
hdf5-6e58f671ec62120246a94101a80a47259ffb96c3.tar.bz2
[svn-r24021] Description:
Bring r24020 from trunk to 1.8 branch: Clean up compiler warnings Tested on: Mac OSX/64 10.8.4 (amazon) w/C++ & FORTRAN (too minor to require h5committest)
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump_ddl.c12
-rw-r--r--tools/h5dump/h5dump_ddl.h5
-rw-r--r--tools/h5dump/h5dump_xml.c3
-rw-r--r--tools/h5dump/h5dumpgentest.c11
4 files changed, 19 insertions, 12 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index e18b2f0..d5ee06e 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -24,6 +24,10 @@
#include "h5dump_extern.h"
#include "h5dump_ddl.h"
+/* callback function used by H5Literate() */
+static herr_t dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void *op_data);
+static int dump_extlink(hid_t group, const char *linkname, const char *objname);
+
/*-------------------------------------------------------------------------
* Function: dump_datatype
*
@@ -145,6 +149,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo
return ret;
}
+
/*-------------------------------------------------------------------------
* Function: dump_all_cb
*
@@ -166,7 +171,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED *op_data)
{
hid_t obj;
@@ -1821,9 +1826,8 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe, const
*
*-------------------------------------------------------------------------
*/
-
-
-static int dump_extlink(hid_t group, const char *linkname, const char *objname)
+static int
+dump_extlink(hid_t group, const char *linkname, const char *objname)
{
hid_t oid;
H5O_info_t oi;
diff --git a/tools/h5dump/h5dump_ddl.h b/tools/h5dump/h5dump_ddl.h
index c769194..eccc3bc 100644
--- a/tools/h5dump/h5dump_ddl.h
+++ b/tools/h5dump/h5dump_ddl.h
@@ -12,13 +12,10 @@
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
#ifndef H5DUMP_DDL_H__
#define H5DUMP_DDL_H__
-/* callback function used by H5Literate() */
-static herr_t dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void *op_data);
-static int dump_extlink(hid_t group, const char *linkname, const char *objname);
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 28264e7..53ad894 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -38,7 +38,7 @@ static char *xml_escape_the_string(const char *, int);
static char *xml_escape_the_name(const char *);
/*-------------------------------------------------------------------------
- * Function: dump_all_cb
+ * Function: xml_dump_all_cb
*
* Purpose: function callback called by H5Literate,
* displays everything in the specified object
@@ -1782,7 +1782,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
int ndims;
int i;
int status = -1;
- int stdindent = COL; /* should be 3 */
void *buf = NULL;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index e738fd3..dc4211e 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -3412,14 +3412,19 @@ static void gent_array8(void)
H5P_DEFAULT);
if(dset>=0)
status = H5Dwrite (dset, filetype, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ HDassert(status >= 0);
}
/*
* Close and release resources.
*/
status = H5Dclose (dset);
+ HDassert(status >= 0);
status = H5Sclose (space);
+ HDassert(status >= 0);
status = H5Tclose (filetype);
+ HDassert(status >= 0);
status = H5Fclose (file);
+ HDassert(status >= 0);
}
static void gent_empty(void)
@@ -7361,14 +7366,17 @@ gent_charsets(void)
sid = H5Screate_simple( 1, dim, NULL );
fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII );
+ HDassert(status >= 0);
H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid );
status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 );
+ HDassert(status >= 0);
H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid );
did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT );
status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData );
+ HDassert(status >= 0);
H5Tclose( charset_dtid );
H5Tclose( ascii_dtid );
@@ -7379,7 +7387,7 @@ gent_charsets(void)
}
static void gent_compound_intsizes(void) {
- hid_t fid, dataset, space, root;
+ hid_t fid, dataset, space;
hsize_t dims[2];
hsize_t array_dim8[]={F70_XDIM,F70_YDIM8}; /* Array dimensions */
hsize_t array_dim16[]={F70_XDIM,F70_YDIM16}; /* Array dimensions */
@@ -7956,7 +7964,6 @@ static void gent_nested_compound_dt(void) { /* test nested data type */
dset3_t dset3[10];
enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE};
- dset1_t dset5[10];
int i, j, k;
unsigned ndims;