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

OESS-168: Remove clang warnings. #1105

Merged
merged 5 commits into from
Nov 4, 2021

Conversation

hyoklee
Copy link
Member

@hyoklee hyoklee commented Oct 15, 2021

This patch will remove clang double-promotion warning.

*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) - \
Copy link
Member

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

@lrknox
Copy link
Collaborator

lrknox commented Oct 29, 2021

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?

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))) { \
Copy link
Member

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 :)

@lrknox lrknox merged commit 55ee1fd into HDFGroup:develop Nov 4, 2021
hyoklee added a commit to hyoklee/hdf5 that referenced this pull request Nov 12, 2021
lrknox pushed a commit that referenced this pull request Nov 13, 2021
* 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>
@hyoklee hyoklee deleted the OESS-168-H5Zscaleoffset branch July 14, 2022 21:36
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