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

Merged
merged 4 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@
#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*/
#define H5_ATTR_FALLTHROUGH /* FALLTHROUGH */
#endif
#else
#define H5_ATTR_FORMAT(X, Y, Z) /*void*/
Expand Down
30 changes: 20 additions & 10 deletions src/uthash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Copy link
Member

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.

case 10: \
hashv += ((unsigned)_hj_key[9] << 16); /* FALLTHROUGH */ \
hashv += ((unsigned)_hj_key[9] << 16); \
H5_ATTR_FALLTHROUGH \
case 9: \
hashv += ((unsigned)_hj_key[8] << 8); /* FALLTHROUGH */ \
hashv += ((unsigned)_hj_key[8] << 8); \
H5_ATTR_FALLTHROUGH \
case 8: \
_hj_j += ((unsigned)_hj_key[7] << 24); /* FALLTHROUGH */ \
_hj_j += ((unsigned)_hj_key[7] << 24); \
H5_ATTR_FALLTHROUGH \
case 7: \
_hj_j += ((unsigned)_hj_key[6] << 16); /* FALLTHROUGH */ \
_hj_j += ((unsigned)_hj_key[6] << 16); \
H5_ATTR_FALLTHROUGH \
case 6: \
_hj_j += ((unsigned)_hj_key[5] << 8); /* FALLTHROUGH */ \
_hj_j += ((unsigned)_hj_key[5] << 8); \
H5_ATTR_FALLTHROUGH \
case 5: \
_hj_j += _hj_key[4]; /* FALLTHROUGH */ \
_hj_j += _hj_key[4]; \
H5_ATTR_FALLTHROUGH \
case 4: \
_hj_i += ((unsigned)_hj_key[3] << 24); /* FALLTHROUGH */ \
_hj_i += ((unsigned)_hj_key[3] << 24); \
H5_ATTR_FALLTHROUGH \
case 3: \
_hj_i += ((unsigned)_hj_key[2] << 16); /* FALLTHROUGH */ \
_hj_i += ((unsigned)_hj_key[2] << 16); \
H5_ATTR_FALLTHROUGH \
case 2: \
_hj_i += ((unsigned)_hj_key[1] << 8); /* FALLTHROUGH */ \
_hj_i += ((unsigned)_hj_key[1] << 8); \
H5_ATTR_FALLTHROUGH \
case 1: \
_hj_i += _hj_key[0]; \
} \
Expand Down