-
-
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. #1105
Conversation
src/H5Zscaleoffset.c
Outdated
*minbits = sizeof(int) * 8; \ | ||
goto done; \ | ||
} \ | ||
} \ | ||
else if (sizeof(type) == sizeof(long)) { \ | ||
if (round_fun(max * pow_fun(10.0F, (type)D_val) - min * pow_fun(10.0F, (type)D_val)) > \ | ||
pow_fun(2.0F, (type)(sizeof(long) * 8 - 1))) { \ | ||
if (round_fun(max * pow_fun((type)10.0F, (type)D_val) - \ |
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.
You should remove the .0F part of it if you're casting 10.0F to another type
All github checks passed after clang-format changes were committed. See https://github.com/HDFGroup/hdf5/actions/runs/1366283744. @soumagne, with changes made, is this ok, now? |
src/H5Zscaleoffset.c
Outdated
if (round_fun(max * pow_fun(10.0F, (type)D_val) - min * pow_fun(10.0F, (type)D_val)) > \ | ||
pow_fun(2.0F, (type)(sizeof(int) * 8 - 1))) { \ | ||
if (round_fun(max * pow_fun((type)10, (type)D_val) - min * pow_fun((type)10, (type)D_val)) > \ | ||
pow_fun((type)2.0F, (type)(sizeof(int) * 8 - 1))) { \ |
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.
it would have been good to fix also the 2.0F and not only the 10.0F :)
* 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 patch will remove clang double-promotion warning.