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

Fixes a bit shift issue in an MPI constant #65

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

derobins
Copy link
Member

Redefines TWO_GIG_LIMIT to be INT32_MAX instead of 1 << 31, which
fixes an issue revealed by compiling with -Wshift-overflow.

Redefines TWO_GIG_LIMIT to be INT32_MAX instead of 1 << 31, which
fixes an issue revealed by compiling with -Wshift-overflow.
@derobins
Copy link
Member Author

Fixes this warning:

../../develop/src/H5mpi.c: In function ‘H5_mpi_set_bigio_count’:
../../develop/src/H5mpi.c:28:26: warning: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
28 | #define TWO_GIG_LIMIT (1 << 31)
| ^~
../../develop/src/H5mpi.c:56:50: note: in expansion of macro ‘TWO_GIG_LIMIT’
56 | if ((new_count > 0) && (new_count < (hsize_t)TWO_GIG_LIMIT)) {

@lrknox lrknox merged commit 747cecb into HDFGroup:develop Oct 30, 2020
@derobins derobins deleted the minor/mpi_2gb_limit branch July 28, 2021 16:52
vchoi-hdfgroup added a commit that referenced this pull request May 19, 2022
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.

3 participants