summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-19 15:02:10 (GMT)
committerGitHub <noreply@github.com>2021-08-19 15:02:10 (GMT)
commit0704eb1997af648776676fbbbfe5c8ffd1456286 (patch)
tree5008442e27e62d1d6737362de4f94863892e0685
parent142c8515e7c84af692aee2281558fd58fcc6d587 (diff)
downloadhdf5-0704eb1997af648776676fbbbfe5c8ffd1456286.zip
hdf5-0704eb1997af648776676fbbbfe5c8ffd1456286.tar.gz
hdf5-0704eb1997af648776676fbbbfe5c8ffd1456286.tar.bz2
Add cast to relnum for merge of #812 (#932)
-rw-r--r--src/H5.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5.c b/src/H5.c
index 4cabc18..e3ba172 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -841,7 +841,10 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
}
/* H5_VERS_MAJOR and H5_VERS_MINOR must match */
- if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum || H5_VERS_RELEASE > relnum) {
+ /* Cast relnum to int to avoid warning for unsigned < 0 comparison
+ * in first release versions */
+ if (H5_VERS_MAJOR != majnum || H5_VERS_MINOR != minnum || H5_VERS_RELEASE > (int)relnum) {
+
switch (disable_version_check) {
case 0:
HDfprintf(stderr, "%s%s", version_mismatch_warning,