mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Avoid "implicit fallthrough" warnings also from clang.
This commit is contained in:
@@ -93,7 +93,7 @@ hash (register const char *str, register size_t len)
|
||||
{
|
||||
default:
|
||||
hval += asso_values[(unsigned char)str[21]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -111,7 +111,7 @@ hash (register const char *str, register size_t len)
|
||||
case 12:
|
||||
case 11:
|
||||
hval += asso_values[(unsigned char)str[10]+1];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -119,7 +119,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 10:
|
||||
hval += asso_values[(unsigned char)str[9]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -127,7 +127,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 9:
|
||||
hval += asso_values[(unsigned char)str[8]+1];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -135,7 +135,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 8:
|
||||
hval += asso_values[(unsigned char)str[7]+3];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -143,7 +143,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 7:
|
||||
hval += asso_values[(unsigned char)str[6]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -151,7 +151,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 6:
|
||||
hval += asso_values[(unsigned char)str[5]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -159,7 +159,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 5:
|
||||
hval += asso_values[(unsigned char)str[4]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -167,7 +167,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 4:
|
||||
hval += asso_values[(unsigned char)str[3]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -175,7 +175,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 3:
|
||||
hval += asso_values[(unsigned char)str[2]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
@@ -183,7 +183,7 @@ hash (register const char *str, register size_t len)
|
||||
/*FALLTHROUGH*/
|
||||
case 2:
|
||||
hval += asso_values[(unsigned char)str[1]+1];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
|
||||
Reference in New Issue
Block a user