-
-
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. #1124
Conversation
src/H5private.h
Outdated
@@ -252,7 +252,7 @@ | |||
#define H5_ATTR_NORETURN __attribute__((noreturn)) | |||
#define H5_ATTR_CONST __attribute__((const)) | |||
#define H5_ATTR_PURE __attribute__((pure)) | |||
#if defined(__GNUC__) && __GNUC__ >= 7 && !defined(__INTEL_COMPILER) | |||
#if defined(__clang__) || defined(__GNUC__) && __GNUC__ >= 7 && !defined(__INTEL_COMPILER) | |||
#define H5_ATTR_FALLTHROUGH __attribute__((fallthrough)); | |||
#else | |||
#define H5_ATTR_FALLTHROUGH /*void*/ |
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.
Don't a lot of compilers respect a /* FALLTHROUGH */ comment? We might want to consider using that comment instead of /void/.
@@ -714,25 +714,35 @@ typedef unsigned char uint8_t; | |||
hashv += (unsigned)(keylen); \ | |||
switch (_hj_k) { \ | |||
case 11: \ | |||
hashv += ((unsigned)_hj_key[10] << 24); /* FALLTHROUGH */ \ | |||
hashv += ((unsigned)_hj_key[10] << 24); \ | |||
H5_ATTR_FALLTHROUGH \ |
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.
uthash is a file copied from an external repo. If it changes and we update it, we'll need to make sure these changes aren't lost.
All Github checks passed after clang-format changes committed. |
Please change this to use /* FALLTHROUGH / instead of / void */ before merging. It's a trivial change and will help some compilers. |
* 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>
Remove
warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
from