diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-07-30 16:46:39 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-07-30 16:46:39 (GMT) |
commit | 88aa0d5c76545eabf08be069a684fd7328eb4185 (patch) | |
tree | 1f6654046dcc7f47103dcf24e8e5fe1f50035434 /tools/src | |
parent | 2ece66e999876e78dcc8561ee2a2122e88fb14a1 (diff) | |
parent | ff4a9d0ec2e85cf15f769006e92e756a79869ab8 (diff) | |
download | hdf5-88aa0d5c76545eabf08be069a684fd7328eb4185.zip hdf5-88aa0d5c76545eabf08be069a684fd7328eb4185.tar.gz hdf5-88aa0d5c76545eabf08be069a684fd7328eb4185.tar.bz2 |
Merge pull request #2718 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ff4a9d0ec2e85cf15f769006e92e756a79869ab8':
Warnings reduction in tools
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5import/h5import.c | 4 | ||||
-rw-r--r-- | tools/src/h5ls/h5ls.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index b11fe7f..4a642e0 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -3735,8 +3735,8 @@ static int getExternalFilename(struct Input *in, FILE *strm) return (-1); } - in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp)) * sizeof(char)); - (void) HDstrcpy(in->externFilename, temp); + in->externFilename = (char *) HDmalloc ((size_t) (HDstrlen(temp) + 1) * sizeof(char)); + (void) HDstrncpy(in->externFilename, temp, HDstrlen(temp) + 1); return (0); } diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index fef7aa9..e239cbc 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1313,7 +1313,6 @@ dump_dataset_values(hid_t dset) hid_t space = H5I_INVALID_HID; hsize_t total_size[H5S_MAX_RANK]; int ndims; - size_t i; char string_prefix[64]; static char fmt_double[16]; static char fmt_float[16]; @@ -1481,7 +1480,6 @@ dump_attribute_values(hid_t attr) hid_t space = H5I_INVALID_HID; hsize_t total_size[H5S_MAX_RANK]; int ndims; - size_t i; char string_prefix[64]; static char fmt_double[16]; static char fmt_float[16]; |