summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
diff options
context:
space:
mode:
authorKimmy Mu <kmu@hdfgroup.org>2020-01-28 19:28:26 (GMT)
committerKimmy Mu <kmu@hdfgroup.org>2020-01-28 19:28:26 (GMT)
commit71c050f837149a0c11e0936e661047c091deaa2f (patch)
tree05bc0afc7c0907369e7e6ac2953689229e63d76f /tools/test/h5repack
parent57dd6d9864f79a4c4d89865978628219145a1ab0 (diff)
parent406330addf45529ecdd088f4d22e9aab9a03661d (diff)
downloadhdf5-71c050f837149a0c11e0936e661047c091deaa2f.zip
hdf5-71c050f837149a0c11e0936e661047c091deaa2f.tar.gz
hdf5-71c050f837149a0c11e0936e661047c091deaa2f.tar.bz2
Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop
* commit '406330addf45529ecdd088f4d22e9aab9a03661d': rename macro change condition pick up from Dave's fix leave Wswitch-default for later fix fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/h5repackgentest.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index a61d8d7..7604964 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -231,9 +231,9 @@ generate_int32le_3d(hbool_t external) {
/* generate values, alternating positive and negative
*/
- for (i = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++) {
- for (k = 0; k < dims[2]; k++, n++) {
+ for (i = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++) {
+ for (k = 0; (hsize_t)k < dims[2]; k++, n++) {
wdata[n] = (k + j * 512 + i * 4096) * ((n & 1) ? (-1) : (1));
}
}
@@ -263,9 +263,9 @@ generate_uint8be(hbool_t external) {
/* Generate values, ping-pong from ends of range
*/
- for (i = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++) {
- for (k = 0; k < dims[2]; k++, n++) {
+ for (i = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++) {
+ for (k = 0; (hsize_t)k < dims[2]; k++, n++) {
wdata[n] = (uint8_t)((n & 1) ? -n : n);
}
}
@@ -294,8 +294,8 @@ generate_f32le(hbool_t external) {
int ret_value = 0;
/* Generate values */
- for (i = 0, k = 0, n = 0; i < dims[0]; i++) {
- for (j = 0; j < dims[1]; j++, k++, n++) {
+ for (i = 0, k = 0, n = 0; (hsize_t)i < dims[0]; i++) {
+ for (j = 0; (hsize_t)j < dims[1]; j++, k++, n++) {
wdata[k] = n * 801.1f * ((k % 5 == 1) ? (-1) : (1));
}
}