summaryrefslogtreecommitdiffstats
path: root/hl/c++
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 /hl/c++
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 'hl/c++')
-rw-r--r--hl/c++/test/ptableTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index bf60402..900f8a9 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -616,11 +616,11 @@ TestHDFFV_9758()
s1_t s1[NUM_PACKETS];
for (hsize_t i = 0; i < NUM_PACKETS; i++) {
- s1[i].a = i;
+ s1[i].a = static_cast<int>(i);
s1[i].b = 1.f * static_cast<float>(i * i);
s1[i].c = 1. / (i + 1);
HDsprintf(s1[i].d, "string%d", (int)i);
- s1[i].e = 100 + i;
+ s1[i].e = static_cast<int>(100 + i);
}
printf("Testing %-62s", "data corruption in packed structs (HDFFV-9758)");