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. #1136

Merged
merged 2 commits into from
Nov 5, 2021
Merged

Conversation

hyoklee
Copy link
Member

@hyoklee hyoklee commented Oct 22, 2021

This will remove warning: variable 'fid' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized].

test/swmr.c Outdated
@@ -5220,7 +5220,7 @@ test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
static int
test_file_lock_swmr_concur(hid_t in_fapl)
{
hid_t fid; /* File ID */
hid_t fid = -1; /* File ID */
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of -1 use H5INVALID_ID

Copy link
Member

Choose a reason for hiding this comment

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

See my comments in #1137

Copy link
Member

Choose a reason for hiding this comment

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

Also, as a rule, I initialize all IDs to H5I_INVALID_HID as it makes cleanup easier.

@lrknox lrknox merged commit b3f35a9 into HDFGroup:develop Nov 5, 2021
hyoklee added a commit to hyoklee/hdf5 that referenced this pull request Nov 13, 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-swmr.c 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