summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:16:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-12 15:16:56 (GMT)
commitf2bf0d60a25f4a88d1a26bd95e268adec05eba3c (patch)
tree582fb5653c4b50f8ee2eafca0b6365549284ed13 /tools
parent7e8d2c982199c03dc5aa4fd95dd7d44b83d84f65 (diff)
parentd92575889bc5a509ba2ac428c2086855edd26b32 (diff)
downloadhdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.zip
hdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.tar.gz
hdf5-f2bf0d60a25f4a88d1a26bd95e268adec05eba3c.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_8)
* commit 'd92575889bc5a509ba2ac428c2086855edd26b32': fix merge error Merge pull request #2244 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop Merge pull request #2071 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop Merge pull request #2234 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/dynlib_diff.c4
-rw-r--r--tools/h5dump/dynlib_dump.c4
-rw-r--r--tools/h5dump/h5dumpgentest.c20
-rw-r--r--tools/h5import/h5import.c6
-rw-r--r--tools/h5ls/dynlib_ls.c4
-rw-r--r--tools/h5repack/h5repackgentest.c4
-rw-r--r--tools/lib/h5diff.c2
-rw-r--r--tools/lib/h5diff_attr.c2
-rw-r--r--tools/perform/pio_engine.c6
-rw-r--r--tools/perform/pio_perf.c4
10 files changed, 28 insertions, 28 deletions
diff --git a/tools/h5diff/dynlib_diff.c b/tools/h5diff/dynlib_diff.c
index 571452e..661a6dc 100644
--- a/tools/h5diff/dynlib_diff.c
+++ b/tools/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 = (int8_t)(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 = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5dump/dynlib_dump.c b/tools/h5dump/dynlib_dump.c
index 571452e..661a6dc 100644
--- a/tools/h5dump/dynlib_dump.c
+++ b/tools/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 = (int8_t)(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 = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 8ba752d..967bc0f 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -2545,7 +2545,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] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -2559,7 +2559,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] = (uint8_t)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -9664,7 +9664,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);
@@ -9679,7 +9679,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);
@@ -9729,7 +9729,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;
+ H5_CHECKED_ASSIGN(buf[i], uint8_t, 0xff ^ i, size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
H5Dclose(dset);
}
@@ -9745,7 +9745,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);
+ H5_CHECKED_ASSIGN(buf2[i], uint16_t, 0xffff ^ (i * 16), size_t);
H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
H5Dclose(dset);
@@ -9768,8 +9768,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);
+ H5_CHECKED_ASSIGN(buf5[i].a, uint8_t, 0xff ^ i, size_t);
+ H5_CHECKED_ASSIGN(buf5[i].b, uint16_t, 0xffff ^ (i * 16), size_t);
buf5[i].c = (uint32_t)0xffffffff ^ (uint32_t)(i * 32);
buf5[i].d = (uint64_t)0xffffffffffffffff ^ (uint64_t)(i * 64);
}
@@ -10343,7 +10343,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 = (int8_t)(temp - MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
@@ -10352,7 +10352,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 = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 1eef5ab..bd1689f 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -4707,14 +4707,14 @@ static int process(struct Options *opt)
return (0);
}
-uint16_t swap_uint16( uint16_t val)
+uint16_t swap_uint16(uint16_t val)
{
- return (val << 8) | (val >> 8);
+ return (uint16_t)((val << 8) | (val >> 8));
}
int16_t swap_int16(int16_t val)
{
- return (val << 8) | ((val >> 8) & 0xFF);
+ return (int16_t)((val << 8) | ((val >> 8) & 0xFF));
}
uint32_t swap_uint32(uint32_t val)
diff --git a/tools/h5ls/dynlib_ls.c b/tools/h5ls/dynlib_ls.c
index 571452e..661a6dc 100644
--- a/tools/h5ls/dynlib_ls.c
+++ b/tools/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 = (int8_t)(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 = (int8_t)(temp + MULTIPLIER);
int_ptr++;
buf_left -= sizeof(*int_ptr);
} /* end while */
diff --git a/tools/h5repack/h5repackgentest.c b/tools/h5repack/h5repackgentest.c
index aaac285..77fb28a 100644
--- a/tools/h5repack/h5repackgentest.c
+++ b/tools/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 & 1) ? -n : n);
}
}
}
@@ -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/lib/h5diff.c b/tools/lib/h5diff.c
index c028c4e..6569778 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -907,7 +907,7 @@ h5diff(const char *fname1,
parallel_print("file1 file2\n");
parallel_print("---------------------------------------\n");
for(u = 0; u < match_list->nobjs; u++) {
- char c1, c2;
+ int c1, c2;
c1 = (match_list->objs[u].flags[0]) ? 'x' : ' ';
c2 = (match_list->objs[u].flags[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, match_list->objs[u].name);
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 7f08cc7..a526aa4 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -273,7 +273,7 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
parallel_print(" obj1 obj2\n");
parallel_print(" --------------------------------------\n");
for(i = 0; i < (unsigned int) table_lp->nattrs; i++) {
- char c1, c2;
+ int c1, c2;
c1 = (table_lp->attrs[i].exist[0]) ? 'x' : ' ';
c2 = (table_lp->attrs[i].exist[1]) ? 'x' : ' ';
parallel_print("%5c %6c %-15s\n", c1, c2, table_lp->attrs[i].name);
diff --git a/tools/perform/pio_engine.c b/tools/perform/pio_engine.c
index 798e32e..b5d91aa 100644
--- a/tools/perform/pio_engine.c
+++ b/tools/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/perform/pio_perf.c b/tools/perform/pio_perf.c
index 93741c4..361e824 100644
--- a/tools/perform/pio_perf.c
+++ b/tools/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);