Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added int variable for comparison with H5_VERS_RELEASE in H5.c to avoid #866

Merged
merged 1 commit into from
Jul 30, 2021
Merged

Added int variable for comparison with H5_VERS_RELEASE in H5.c to avoid #866

merged 1 commit into from
Jul 30, 2021

Conversation

lrknox
Copy link
Collaborator

@lrknox lrknox commented Jul 29, 2021

warning that unsigned comparison < 0 is always false, which is known,
but for later versions the comparison can possibly be true.

warning that unsigned comparison < 0 is always false, which is known,
        but for later versions the comparison can possibly be true.
@lrknox lrknox merged commit 9fd356e into HDFGroup:develop Jul 30, 2021
@@ -912,6 +912,8 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
static unsigned int disable_version_check = 0; /* Set if the version check should be disabled */
static const char * version_mismatch_warning = VERSION_MISMATCH_WARNING;
herr_t ret_value = SUCCEED; /* Return value */
int releasenum = relnum; /* To avoid warning for unsigned < 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not make sense to me. Basically your're setting an int from an unsigned int?
What is H5_VERS_RELEASE defined as? Would a cast work? H5_VERS_RELEASE > (int)relnum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants