diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2021-06-16 20:45:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 20:45:26 (GMT) |
commit | bb7dfbebdcaf3a838d03167a309b9934b997ce92 (patch) | |
tree | abd9e0690ace1a47cc8c6a7e73c49281d38483c3 /src/H5.c | |
parent | e4e9bb70db3ee275977caad4b494021af41619d7 (diff) | |
download | hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.zip hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.tar.gz hdf5-bb7dfbebdcaf3a838d03167a309b9934b997ce92.tar.bz2 |
Fix several warnings (#747)
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -960,12 +960,9 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) * Check only the first sizeof(lib_str) char. Assume the information * will fit within this size or enough significance. */ - HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR, - H5_VERS_RELEASE); - if (*substr) { - HDstrncat(lib_str, "-", (size_t)1); - HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1); - } /* end if */ + HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d%s%s", H5_VERS_MAJOR, + H5_VERS_MINOR, H5_VERS_RELEASE, (*substr ? "-" : ""), substr); + if (HDstrcmp(lib_str, H5_lib_vers_info_g) != 0) { HDfputs("Warning! Library version information error.\n" "The HDF5 library version information are not " |