diff options
author | Sean McBride <sean@rogue-research.com> | 2021-02-25 18:15:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 18:15:02 (GMT) |
commit | c29e1b9fdfcba9ca276600b1bad4ec2cf17bb01e (patch) | |
tree | 59c16ade26ea62e2ffc89506e1a245b4f296b82e /hl | |
parent | c17b4b93d680340af2b3f2c026f2c03c3baeb33a (diff) | |
download | hdf5-c29e1b9fdfcba9ca276600b1bad4ec2cf17bb01e.zip hdf5-c29e1b9fdfcba9ca276600b1bad4ec2cf17bb01e.tar.gz hdf5-c29e1b9fdfcba9ca276600b1bad4ec2cf17bb01e.tar.bz2 |
Patches from vtk (#358)
* Drop the export attribute on forward declaration
They don't mean anything on forward declarations anyways.
* Fixed -Wunused-parameter warnings in some C++ files
Allowed all the attribute #defines to work in C++ also.
* Fixed -Wunused-variable warnings by removing dead code
* Fixed all -Wshorten-64-to-32 warnings by adjusting casts
There was no truncation in fact, since the unsigned result was upcast to size_t then implicitly downcast to uint32_t.
* Fixed all -Wcomma warnings by spliting statements onto own lines
* Fixed all -Wself-assign warnings with different unused param suppression
* Fixed all -Wextra-semi warnings
* Fixed all -Wswitch-enum warnings
Just added new explicit cases with the existing default case.
* Fixed all -Wmissing-prototypes warnings
Just made functions static. Moved them into an extern "C" block.
* Reformatted source with bin/format_source using clang version 10.0.1
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'hl')
-rw-r--r-- | hl/c++/src/H5PacketTable.h | 2 | ||||
-rw-r--r-- | hl/src/H5IM.c | 8 | ||||
-rw-r--r-- | hl/src/H5LT.c | 14 | ||||
-rw-r--r-- | hl/tools/gif2h5/hdfgifwr.c | 12 |
4 files changed, 13 insertions, 23 deletions
diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index 735901f..825caf7 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -163,7 +163,7 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable { /* Destructor * Cleans up the packet table */ - virtual ~FL_PacketTable(){}; + virtual ~FL_PacketTable() {} /* AppendPacket * Adds a single packet to the packet table. Takes a pointer diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 64cb535..310d665 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -160,7 +160,8 @@ H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t *------------------------------------------------------------------------- */ static herr_t -find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_palette(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + H5_ATTR_UNUSED void *op_data) { int ret = H5_ITER_CONT; @@ -168,11 +169,6 @@ find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_d if (name == NULL) return -1; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - op_data = op_data; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 267e38e..6478a96 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1297,7 +1297,8 @@ out: */ static herr_t -find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_data) +find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5L_info2_t *linfo, + void *op_data) { /* Define a default zero value for return. This will cause the iterator to continue if * the dataset is not found yet. @@ -1308,10 +1309,6 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_ if (name == NULL) return ret; - /* Shut the compiler up */ - loc_id = loc_id; - linfo = linfo; - /* Define a positive value for return value if the dataset was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success @@ -1841,7 +1838,8 @@ H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_na *------------------------------------------------------------------------- */ static herr_t -find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_attr(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + void *op_data) { int ret = H5_ITER_CONT; @@ -1849,10 +1847,6 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data if (name == NULL) return H5_ITER_CONT; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 333c808..8068829 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -152,12 +152,12 @@ hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap } /* Shut compiler up... */ - ptype = ptype; - rmap = rmap; - gmap = gmap; - bmap = bmap; - numcols = numcols; - colorstyle = colorstyle; + (void)ptype; + (void)rmap; + (void)gmap; + (void)bmap; + (void)numcols; + (void)colorstyle; for (i = 0; i < 256; i++) { pc2nc[i] = pc2ncmap[i]; |