-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
OESS-168: Remove clang warnings. #1127
Conversation
H5FD_CORE_WRITE_TRACKING_PAGE_SIZE}; | ||
static const H5FD_core_fapl_t H5FD_core_default_paged_config_g = {H5_MB, TRUE, TRUE, (size_t)4096}; | ||
static const H5FD_core_fapl_t H5FD_core_default_paged_config_g = {(size_t)H5_MB, TRUE, TRUE, (size_t)4096}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, I guess, but I would probably create a const int H5_CORE_DEFAULT_ALLOC_SIZE or something like that and make it 1024 * 1024 instead. That's more in the spirit of what's intended and doesn't torture the floating-point H5_MB into a new use.
Also, the size_t cast for 4096 is probably superfluous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that already and it generated more warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilers are weird
clang-format check failed, identifying the changes below for lines 193 and 955. Usually it commits the changes, but this time did not. If the changes look reasonable, maybe change them manually, commit the changes and see what happens? --- ./src/H5FDcore.c (original) /* Default configurations, if none provided */
+static const H5FD_core_fapl_t H5FD_core_default_config_g = {
/* Define a free list to manage the region type */
|
* TRILAB-266: Remove clang warnings in src/H5Zscaleoffset.c. (PR #1105) * Committing clang-format changes * TRILAB-266: Remove clang warnings in H5private.h and uthash.h. (PR #1124) * TRILAB-266: Remove clang warnings in H5FDcore.c. (PR #1127) * Committing clang-format changes * TRILAB-266: Remove clang warnings in test/testmeta.c. (PR #1135) * TRILAB-266: Remove clang warnings in test/swmr.c. (PR #1136) * TRILAB-266: Remove clang warnings in test/cork.c. (PR #1137) * Committing clang-format changes * TRILAB-266: Remove clang warnings in test/cork.c. (PR #1146) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This will remove
warning: implicit conversion turns floating-point number into integer: 'float' to 'size_t' (aka 'unsigned long') [-Wfloat-conversion]
warnings.