diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-04 21:06:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-04 21:06:30 (GMT) |
commit | 580008d5bb39e3a9a4a92aefe06dce6941cd485b (patch) | |
tree | 449ff31910ac3efa9307c932b5f93f354ff14e94 /test | |
parent | fb210fc4fd70ce68b95a08f91eee2580552b6d21 (diff) | |
download | hdf5-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 'test')
-rw-r--r-- | test/cache.c | 8 | ||||
-rw-r--r-- | test/dtypes.c | 2 | ||||
-rw-r--r-- | test/filter_plugin2_dsets.c | 2 | ||||
-rw-r--r-- | test/filter_plugin4_groups.c | 2 | ||||
-rw-r--r-- | test/tarray.c | 43 |
5 files changed, 30 insertions, 27 deletions
diff --git a/test/cache.c b/test/cache.c index 767bae0..b88b30e 100644 --- a/test/cache.c +++ b/test/cache.c @@ -27297,7 +27297,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) /* Fill out the rest of the cache with entries */ /* Verify expected status of entries after each insertion */ - for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) { + for (; entry_idx < 50; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -27431,7 +27431,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged) * After each insertion, verify the expected status of the * entries in the cache. */ - for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) { + for (; entry_idx < 100; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -33243,7 +33243,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) /* Fill out the rest of the cache with entries */ /* Verify expected status of entries after each insertion */ - for (entry_idx = entry_idx; entry_idx < 50; entry_idx++) { + for (; entry_idx < 50; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ @@ -33304,7 +33304,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged) if (pass) { /* Insert 50 more entries (indices 50-99) into the cache. */ - for (entry_idx = entry_idx; entry_idx < 100; entry_idx++) { + for (; entry_idx < 100; entry_idx++) { if (fill_via_insertion) { insert_entry(file_ptr, /* H5F_t * file_ptr */ diff --git a/test/dtypes.c b/test/dtypes.c index 27d31d4..c0fe764 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -1434,7 +1434,7 @@ test_compound_8(void) int b; } s1; - typedef struct s2 { + struct s2 { char c; s1 d; } s2; diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c index 08be78c..4a881aa 100644 --- a/test/filter_plugin2_dsets.c +++ b/test/filter_plugin2_dsets.c @@ -73,7 +73,7 @@ mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu return 0; /* Assignment to eliminate unused parameter warning */ - cd_values = cd_values; + (void)cd_values; if (flags & H5Z_FLAG_REVERSE) { /* READ - Divide the original value by MULTIPLIER */ diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c index 237642d..c948491 100644 --- a/test/filter_plugin4_groups.c +++ b/test/filter_plugin4_groups.c @@ -74,7 +74,7 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, const unsigned int *c return 0; /* Assignment to eliminate unused parameter warning. */ - cd_values = cd_values; + (void)cd_values; if (flags & H5Z_FLAG_REVERSE) { /* READ - Remove the suffix from the group name */ diff --git a/test/tarray.c b/test/tarray.c index a63ebd7..089360d 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -157,8 +157,8 @@ test_array_atomic_1d(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -484,8 +484,8 @@ test_array_array_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims1; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -662,8 +662,8 @@ test_array_compound_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -883,8 +883,8 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -945,8 +945,9 @@ test_array_compound_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Nested array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1204,8 +1205,8 @@ test_array_vlen_atomic(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1434,8 +1435,8 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -1466,8 +1467,8 @@ test_array_vlen_array(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2075,8 +2076,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ @@ -2122,8 +2124,9 @@ test_compat(void) /* Check the array dimensions */ for (i = 0; i < ndims; i++) if (rdims1[i] != tdims1[i]) { - TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n", - (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]); + TestErrPrintf( + "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i, + rdims1[i], i, tdims1[i]); continue; } /* end if */ |