summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack/h5repackgentest.c
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-27 15:01:32 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-27 15:01:32 (GMT)
commit5163a7e1cf75edecc2d9e198a68ef00e8c124d00 (patch)
tree899b937df8ea59b756e7aab654f11ad014f75f01 /tools/test/h5repack/h5repackgentest.c
parentf3a4e8164f99d733e6804acddfe1b3b0dfe63634 (diff)
downloadhdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.zip
hdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.tar.gz
hdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.tar.bz2
fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow
Diffstat (limited to 'tools/test/h5repack/h5repackgentest.c')
-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));
}
}