diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2013-08-17 20:05:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2013-08-17 20:05:27 (GMT) |
commit | 308c378ccd9310b19c12d524d123cf5d352b6260 (patch) | |
tree | 69a4527bd8f8777151cd71832ecbc6e802cc0171 /tools/h5dump | |
parent | d663d78cd274a48b702a2d3ce17fa6bb01be1ae1 (diff) | |
download | hdf5-308c378ccd9310b19c12d524d123cf5d352b6260.zip hdf5-308c378ccd9310b19c12d524d123cf5d352b6260.tar.gz hdf5-308c378ccd9310b19c12d524d123cf5d352b6260.tar.bz2 |
[svn-r24020] Description:
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.c | 15 | ||||
-rw-r--r-- | tools/h5dump/h5dump_ddl.h | 5 | ||||
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 3 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 11 |
4 files changed, 19 insertions, 15 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 765cee4..ec93778 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -34,6 +34,10 @@ typedef struct { char *op_name; /* Object name wanted */ } trav_attr_udata_t; +/* 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 * @@ -155,6 +159,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, vo return ret; } + /*------------------------------------------------------------------------- * Function: dump_all_cb * @@ -176,7 +181,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; @@ -1305,7 +1310,6 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *ainfo, vo int i; int j; int k; - char *obj_attrname; char *obj_op_name; char *obj_name; trav_attr_udata_t *attr_data = (trav_attr_udata_t*)_op_data; @@ -1450,9 +1454,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data) void handle_paths(hid_t fid, const char *path_name, void* data, int pe, const char *display_name) { - hid_t obj_id = -1; hid_t gid = -1; - H5O_info_t oinfo; if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) { error_msg("unable to open root group\n"); @@ -2046,9 +2048,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 4511f7b..c4f4638 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 ac74637..71b1e65 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -3421,14 +3421,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) @@ -7397,14 +7402,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 ); @@ -7415,7 +7423,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 */ @@ -7992,7 +8000,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; |