summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-03-04 21:06:30 (GMT)
committerGitHub <noreply@github.com>2021-03-04 21:06:30 (GMT)
commit580008d5bb39e3a9a4a92aefe06dce6941cd485b (patch)
tree449ff31910ac3efa9307c932b5f93f354ff14e94 /examples
parentfb210fc4fd70ce68b95a08f91eee2580552b6d21 (diff)
downloadhdf5-580008d5bb39e3a9a4a92aefe06dce6941cd485b.zip
hdf5-580008d5bb39e3a9a4a92aefe06dce6941cd485b.tar.gz
hdf5-580008d5bb39e3a9a4a92aefe06dce6941cd485b.tar.bz2
More warning fixes (#400)
* Fixed -Wunused-local-typedef warning * Fixed -Wformat warnings In one case also removed a `z` character. There was a `z%d` that I think was supposed to be `%zd` * Fixed -Wshorten-64-to-32 warnings * Fixed -Wself-assign warnings * Fixed -Wreserved-id-macro warnings * Commit format changes from clang-format, clang version 10.0.1. * Fixed -Wself-assign warnings * Fixed -Wunused-local-typedef warning * Fixed -Wformat warnings In two cases also removed a `z` character. There was a `z%d` that was supposed to be `%zd`. * Fixed -Wshorten-64-to-32 warnings * Fixed -Wreserved-id-macro warnings * Fixed -Wself-assign warnings * Format source. * Remove blank lines to pass format check. Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_attribute.c2
-rw-r--r--examples/h5_group.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 3400151..97be7f5 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -235,7 +235,7 @@ attr_info(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
float * float_array; /* Pointer to the array attribute. */
/* avoid warnings */
- opdata = opdata;
+ (void)opdata;
/*
* Open the attribute using its name.
diff --git a/examples/h5_group.c b/examples/h5_group.c
index 4b489f0..40acafe 100644
--- a/examples/h5_group.c
+++ b/examples/h5_group.c
@@ -171,9 +171,9 @@ static herr_t
file_info(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *opdata)
{
/* avoid compiler warnings */
- loc_id = loc_id;
- opdata = opdata;
- linfo = linfo;
+ (void)loc_id;
+ (void)opdata;
+ (void)linfo;
/*
* Display group name. The name is passed to the function by
@@ -198,8 +198,8 @@ group_info(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *opdat
int rank_chunk;
/* avoid warnings */
- opdata = opdata;
- linfo = linfo;
+ (void)opdata;
+ (void)linfo;
/*
* Open the datasets using their names.