summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-29 20:14:54 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-29 20:14:54 (GMT)
commit1531c49730e33e897cdfbdd0bf88267dd7f7c0f4 (patch)
tree6405037745836717f665bb18ccd9e90c81be4f8c /tools/src
parente68d42f8fd4c6b3a65619f53b500dd5dbf646b26 (diff)
parent8c60f6264c46cd9155ce34e12e29e9b0272c0c67 (diff)
downloadhdf5-1531c49730e33e897cdfbdd0bf88267dd7f7c0f4.zip
hdf5-1531c49730e33e897cdfbdd0bf88267dd7f7c0f4.tar.gz
hdf5-1531c49730e33e897cdfbdd0bf88267dd7f7c0f4.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_12)
* commit '8c60f6264c46cd9155ce34e12e29e9b0272c0c67': pick up missing piece from merge Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop remove redundent definition Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop Merge pull request #2311 in HDFFV/hdf5 from ~KMU/hdf5:misc to develop Merge pull request #2315 in HDFFV/hdf5 from ~KMU/hdf5:develop to develop missing prototype warning prototype issue Merge pull request #2306 in HDFFV/hdf5 from ~KMU/hdf5:develop to develop Merge pull request #2300 in HDFFV/hdf5 from ~KMU/hdf5:squashed_cast to develop Merge pull request #2291 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/uninitialized to develop Merge pull request #2295 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/float to develop Merge pull request #2292 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/prototype to develop Merge pull request #2094 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/unused to develop
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/src/h5dump/h5dump_xml.c5
-rw-r--r--tools/src/h5import/h5import.c8
-rw-r--r--tools/src/h5ls/h5ls.c16
-rw-r--r--tools/src/h5repack/h5repack_main.c2
-rw-r--r--tools/src/h5repack/h5repack_parse.c2
-rw-r--r--tools/src/misc/h5clear.c2
7 files changed, 16 insertions, 21 deletions
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 5ba5fb3..c473c8b 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -166,7 +166,7 @@ ph5diff_worker(int nID)
{
struct diff_mpi_args args;
struct diffs_found diffs;
- int i;
+ unsigned i;
/* Make certain we've received the filenames and opened the files already */
if(file1_id < 0 || file2_id < 0)
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 7a3ad80..d9f1f67 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -1798,12 +1798,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
hid_t space = H5I_INVALID_HID;
hid_t type = H5I_INVALID_HID;
hid_t p_type = H5I_INVALID_HID;
- hsize_t size[64];
- hsize_t nelmts = 1;
- int ndims;
- int i;
int status = -1;
- void *buf = NULL;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 81f9a32..00fe7cf 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -4725,15 +4725,15 @@ uint32_t swap_uint32(uint32_t val)
int32_t swap_int32(int32_t val)
{
- val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF);
+ val = (int32_t)(((uint32_t)(val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF));
return (val << 16) | ((val >> 16) & 0xFFFF);
}
int64_t swap_int64(int64_t val)
{
- val = ((val << 8) & 0xFF00FF00FF00FF00ULL) | ((val >> 8) & 0x00FF00FF00FF00FFULL);
- val = ((val << 16) & 0xFFFF0000FFFF0000ULL) | ((val >> 16) & 0x0000FFFF0000FFFFULL);
- return (val << 32) | ((val >> 32) & 0xFFFFFFFFULL);
+ val = (int64_t)(((uint64_t)(val << 8) & 0xFF00FF00FF00FF00ULL) | ((uint64_t)(val >> 8) & 0x00FF00FF00FF00FFULL));
+ val = (int64_t)(((uint64_t)(val << 16) & 0xFFFF0000FFFF0000ULL) | ((uint64_t)(val >> 16) & 0x0000FFFF0000FFFFULL));
+ return (int64_t)((uint64_t)(val << 32) | ((uint64_t)(val >> 32) & 0xFFFFFFFFULL));
}
uint64_t swap_uint64(uint64_t val)
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 279a598..f3f9ede 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1302,7 +1302,7 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
hid_t new_obj_sid = H5I_INVALID_HID;
hsize_t elmt_counter = 0; /*counts the # elements printed. */
size_t ncols = 80; /* available output width */
- size_t i;
+ int i;
hsize_t curr_pos = 0; /* total data element position */
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t datactx; /* print context */
@@ -1312,7 +1312,7 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
if (datactx.ndims > 0)
- for (i = 0; i < (size_t)datactx.ndims; i++)
+ for (i = 0; (unsigned)i < datactx.ndims; i++)
datactx.p_min_idx[i] = 0;
datactx.need_prefix = TRUE;
@@ -1447,13 +1447,13 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
/* Print point information */
H5TOOLS_DEBUG("H5S_SEL_POINTS H5R_DATASET_REGION2");
h5tools_dump_region_data_points(new_obj_sid, new_obj_id, stream, info, &datactx,
- &buffer, &curr_pos, ncols, i, elmt_counter);
+ &buffer, &curr_pos, ncols, (hsize_t)i, elmt_counter);
}
else if(region_type == H5S_SEL_HYPERSLABS) {
/* Print block information */
H5TOOLS_DEBUG("H5S_SEL_HYPERSLABS H5R_DATASET_REGION2");
h5tools_dump_region_data_blocks(new_obj_sid, new_obj_id, stream, info, &datactx,
- &buffer, &curr_pos, ncols, i, elmt_counter);
+ &buffer, &curr_pos, ncols, (hsize_t)i, elmt_counter);
}
else
H5TOOLS_INFO("invalid region type");
@@ -1656,7 +1656,7 @@ dump_dataset_values(hid_t dset)
init_acc_pos(&ctx, total_size);
ctx.need_prefix = TRUE;
- if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) {
+ if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Dread reference read");
if(H5Dread(dset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
HDfree(ref_buf);
@@ -1695,7 +1695,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
-dump_attribute_values(hid_t attr, const char *attr_name)
+dump_attribute_values(hid_t attr)
{
hid_t f_type = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
@@ -1827,7 +1827,7 @@ dump_attribute_values(hid_t attr, const char *attr_name)
init_acc_pos(&ctx, total_size);
ctx.need_prefix = TRUE;
- if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) {
+ if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Aread reference read");
if(H5Aread(attr, H5T_STD_REF, ref_buf) < 0) {
HDfree(ref_buf);
@@ -1955,7 +1955,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_str_close(&buffer);
if (data_g)
- dump_attribute_values(attr, attr_name);
+ dump_attribute_values(attr);
H5Aclose(attr);
}
else {
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index df8c7ef..ea6b0e1 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -280,7 +280,7 @@ int read_info(const char *filename, pack_opt_t *options)
char comp_info[1024];
FILE *fp = NULL;
char c;
- int i, rc = 1;
+ int i;
int ret_value = EXIT_SUCCESS;
if (NULL == (fp = HDfopen(filename, "r"))) {
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index 03fcf0e..95cacc1 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -228,7 +228,7 @@ obj_list_t* parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt,
l = 0;
}
else if (f == -1) {
- filt->filt_flag = HDstrtoul(stype, NULL, 0);
+ filt->filt_flag = (unsigned)HDstrtoul(stype, NULL, 0);
f = 0;
}
else if (p == -1) {
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 927167b..38fa6a2 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -175,7 +175,7 @@ parse_command_line(int argc, const char **argv)
usage(h5tools_getprogname());
goto done;
}
- increment = HDatoi(opt_arg);
+ increment = (hsize_t)HDatoi(opt_arg);
}
break;