summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
authorkmu <kmu@jelly.ad.hdfgroup.org>2019-11-07 20:34:13 (GMT)
committerkmu <kmu@jelly.ad.hdfgroup.org>2019-11-07 20:34:13 (GMT)
commit8b9338ab57eec0cc8fa5a36c44d7b28e52e9a466 (patch)
treef1985055bbea601ded4a545e123d4954ef8529fe /tools/test
parentafd4b291315e39e3966eadaf8ae9894b30e9504e (diff)
downloadhdf5-8b9338ab57eec0cc8fa5a36c44d7b28e52e9a466.zip
hdf5-8b9338ab57eec0cc8fa5a36c44d7b28e52e9a466.tar.gz
hdf5-8b9338ab57eec0cc8fa5a36c44d7b28e52e9a466.tar.bz2
fix warnings from Intel compiler
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5diff/dynlib_diff.c4
-rw-r--r--tools/test/h5dump/dynlib_dump.c4
-rw-r--r--tools/test/h5dump/h5dumpgentest.c20
-rw-r--r--tools/test/h5ls/dynlib_ls.c4
-rw-r--r--tools/test/h5repack/h5repackgentest.c4
-rw-r--r--tools/test/perform/pio_engine.c6
-rw-r--r--tools/test/perform/pio_perf.c4
7 files changed, 23 insertions, 23 deletions
diff --git a/tools/test/h5diff/dynlib_diff.c b/tools/test/h5diff/dynlib_diff.c
index 571452e..4f2d435 100644
--- a/tools/test/h5diff/dynlib_diff.c
+++ b/tools/test/h5diff/dynlib_diff.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (char)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (char)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/dynlib_dump.c b/tools/test/h5dump/dynlib_dump.c
index 571452e..4f2d435 100644
--- a/tools/test/h5dump/dynlib_dump.c
+++ b/tools/test/h5dump/dynlib_dump.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (char)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (char)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index ad70770..85fe754 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -2565,7 +2565,7 @@ static void gent_bitfields(void)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2579,7 +2579,7 @@ static void gent_bitfields(void)
(dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -9814,7 +9814,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ buf[i] = (uint8_t)(0xff ^ i);
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
@@ -9829,7 +9829,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for (i = 0; i < nelmts; i++) {
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf2[i] = (uint16_t)(0xffff ^ (i * 16));
}
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9879,7 +9879,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf[i] = (uint8_t)0xff ^ (uint8_t)i;
+ buf[i] = (uint8_t)(0xff ^ i);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9895,7 +9895,7 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++)
- buf2[i] = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf2[i] = (uint16_t)(0xffff ^ (i * 16));
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9918,8 +9918,8 @@ static void gent_bitnopaquefields(void)
if ((space = H5Screate_simple(1, &nelmts, NULL)) >= 0) {
if ((dset = H5Dcreate2(grp, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
for(i = 0; i < nelmts; i++) {
- buf5[i].a = (uint8_t)0xff ^ (uint8_t)i;
- buf5[i].b = (uint16_t)0xffff ^ (uint16_t)(i * 16);
+ buf5[i].a = (uint8_t)(0xff ^ i);
+ buf5[i].b = (uint16_t)(0xffff ^ (i * 16));
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
@@ -10488,7 +10488,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (char)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -10497,7 +10497,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (char)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5ls/dynlib_ls.c b/tools/test/h5ls/dynlib_ls.c
index 571452e..4f2d435 100644
--- a/tools/test/h5ls/dynlib_ls.c
+++ b/tools/test/h5ls/dynlib_ls.c
@@ -69,7 +69,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Subtract the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp - MULTIPLIER;
+ *int_ptr = (char)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -78,7 +78,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts,
/* Add the original value with MULTIPLIER */
while(buf_left > 0) {
char temp = *int_ptr;
- *int_ptr = temp + MULTIPLIER;
+ *int_ptr = (char)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index aaac285..f476a16 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -266,7 +266,7 @@ generate_uint8be(hbool_t external) {
for (i = 0, n = 0; i < dims[0]; i++) {
for (j = 0; j < dims[1]; j++) {
for (k = 0; k < dims[2]; k++, n++) {
- wdata[n] = n * ((n & 1) ? (-1) : (1));
+ wdata[n] = (uint8_t)(n * ((n & 1) ? (-1) : (1)));
}
}
}
@@ -296,7 +296,7 @@ generate_f32le(hbool_t external) {
/* Generate values */
for (i = 0, k = 0, n = 0; i < dims[0]; i++) {
for (j = 0; j < dims[1]; j++, k++, n++) {
- wdata[k] = n * 801.1 * ((k % 5 == 1) ? (-1) : (1));
+ wdata[k] = (float)(n * 801.1 * ((k % 5 == 1) ? (-1) : (1)));
}
}
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 77c04ab..5d8474b 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -208,7 +208,7 @@ do_pio(parameters param)
bsize = buf_size; /* Actual buffer size */
}
else {
- snbytes = (off_t)sqrt(nbytes); /* General dataset size */
+ snbytes = (off_t)sqrt((double)nbytes); /* General dataset size */
bsize = buf_size * blk_size; /* Actual buffer size */
}
@@ -601,7 +601,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the dataset square.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
/* Contiguous Pattern: */
if (!parms->interleaved) {
@@ -1577,7 +1577,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* nbytes is always the number of bytes per dataset (1D or 2D). If the
dataspace is 2D, snbytes is the size of a side of the 'dataset square'.
*/
- snbytes = (off_t)sqrt(nbytes);
+ snbytes = (off_t)sqrt((double)nbytes);
bsize = buf_size * blk_size;
diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c
index 9f4d116..5977731 100644
--- a/tools/test/perform/pio_perf.c
+++ b/tools/test/perform/pio_perf.c
@@ -1155,9 +1155,9 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
HDfprintf(output, "rank %d: File size=", rank);
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->min_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->min_num_procs),2)
* opts->num_dsets), ":");
- recover_size_and_print((long long)(pow(opts->num_bpp * opts->max_num_procs,2)
+ recover_size_and_print((long long)(pow((double)(opts->num_bpp * opts->max_num_procs),2)
* opts->num_dsets), "\n");
HDfprintf(output, "rank %d: Transfer buffer size=", rank);