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 unused parameter warnings in the null VFD #1179

Merged
merged 1 commit into from
Nov 13, 2021

Conversation

derobins
Copy link
Member

@derobins derobins commented Nov 9, 2021

No description provided.

@derobins
Copy link
Member Author

derobins commented Nov 9, 2021

fwiw, we should abandon the H5_ATTR_UNUSED scheme and replace it with (void) casts, which are less ridiculous and more portable. Then we can get rid of craziness like H5_ATTR_NDEBUG_UNUSED and H5_ATTR_PARALLEL_UNUSED and related.

@gnuoyd
Copy link
Contributor

gnuoyd commented Nov 9, 2021 via email

@soumagne
Copy link
Member

soumagne commented Nov 9, 2021

Also agree with Dave, I think attributes are useful and we should keep them, casting to void is not good imo. We should just simplify them. FWIW you should have a look there: https://github.com/torvalds/linux/blob/master/include/linux/compiler_attributes.h

@derobins
Copy link
Member Author

derobins commented Nov 9, 2021

I'll take a look at those that link and think about this some more. We can discuss at the next engineering meeting. I just want to avoid the macro combinatorial explosion as we started addressing warnings in the non-debug, parallel, etc. cases.

@derobins
Copy link
Member Author

In this case, though, we're not including H5private.h so the macros are not available. Using (void) casts in this instance might be the right choice even if we improve the "attribute unused" macro system for use in the library/tools/tests.

Copy link
Contributor

@gnuoyd gnuoyd left a comment

Choose a reason for hiding this comment

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

This change is fine for code that's external to the library.

@lrknox lrknox merged commit 4475a12 into HDFGroup:develop Nov 13, 2021
@derobins derobins deleted the dev/null_vfd_warnings branch April 13, 2022 23:59
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.

5 participants