From 630f77b50285ab70659d3256135bf8bf6a7e1965 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 24 Feb 2022 19:43:48 -0500 Subject: Revert "try to fix the fallthrough warning" This reverts commit e247b29913de26abef93de2133bf920bbfcd04f1. --- uthash.h | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/uthash.h b/uthash.h index 02f6e0a..d6b54e9 100644 --- a/uthash.h +++ b/uthash.h @@ -423,15 +423,6 @@ do { c -= a; c -= b; c ^= ( b >> 15 ); \ } while (0) -#if defined __has_cpp_attribute - #if __has_cpp_attribute(fallthrough) - #define fallthrough ([[fallthrough]];) - #endif -#endif -#ifndef fallthrough -#define fallthrough /* FALL-THRU */ -#endif - #define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _hj_i,_hj_j,_hj_k; \ @@ -458,25 +449,25 @@ do { hashv += keylen; \ switch ( _hj_k ) { \ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ - fallthrough \ + [[fallthrough]]; \ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ - fallthrough \ + [[fallthrough]]; \ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ - fallthrough \ + [[fallthrough]]; \ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ - fallthrough \ + [[fallthrough]]; \ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ - fallthrough \ + [[fallthrough]]; \ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ - fallthrough \ + [[fallthrough]]; \ case 5: _hj_j += _hj_key[4]; \ - fallthrough \ + [[fallthrough]]; \ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ - fallthrough \ + [[fallthrough]]; \ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ - fallthrough \ + [[fallthrough]]; \ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ - fallthrough \ + [[fallthrough]]; \ case 1: _hj_i += _hj_key[0]; \ } \ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ -- cgit v1.2.3