mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Avoid "implicit fallthrough" warnings in the generated code.
This commit is contained in:
@@ -84,6 +84,11 @@ hash (register const char *str, register size_t len)
|
||||
{
|
||||
default:
|
||||
hval += asso_values[(unsigned char)str[2]];
|
||||
#if defined __cplusplus && __cplusplus >= 201703L
|
||||
[[fallthrough]];
|
||||
#elif defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((__fallthrough__));
|
||||
#endif
|
||||
/*FALLTHROUGH*/
|
||||
case 2:
|
||||
case 1:
|
||||
|
||||
Reference in New Issue
Block a user