diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-07-24 09:35:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-07-24 09:35:58 +0000 |
commit | bc58e5d7345217fa0fbfa0d9c577ee10c7bd94db (patch) | |
tree | e76c9d1daa7b18f9383200459afe40804af83dbf /searchlib | |
parent | 737979601f25ace7e5444dd3c925329c5a0a8b6d (diff) |
Add [[falltrhough]] for gcc 7
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/common/sortresults.cpp | 6 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/predicate/predicate_hash.h | 46 |
2 files changed, 28 insertions, 24 deletions
diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index ebca7249db7..0514ba5ebc1 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -461,14 +461,18 @@ public: default: case 4: r |= _data[a._idx + a._pos + 3] << 0; + [[fallthrough]]; case 3: r |= _data[a._idx + a._pos + 2] << 8; + [[fallthrough]]; case 2: r |= _data[a._idx + a._pos + 1] << 16; + [[fallthrough]]; case 1: r |= _data[a._idx + a._pos + 0] << 24; + [[fallthrough]]; case 0: - ; + [[fallthrough]]; } a._pos += std::min(4u, left); return r; diff --git a/searchlib/src/vespa/searchlib/predicate/predicate_hash.h b/searchlib/src/vespa/searchlib/predicate/predicate_hash.h index af675807afd..7645a041cad 100644 --- a/searchlib/src/vespa/searchlib/predicate/predicate_hash.h +++ b/searchlib/src/vespa/searchlib/predicate/predicate_hash.h @@ -75,30 +75,30 @@ struct PredicateHash { // handle the last 23 bytes c += origLen; switch(len) { // all the case statements fall through - case 23: c+=((0xffLL & aKey[offset+22])<<56); - case 22: c+=((0xffLL & aKey[offset+21])<<48); - case 21: c+=((0xffLL & aKey[offset+20])<<40); - case 20: c+=((0xffLL & aKey[offset+19])<<32); - case 19: c+=((0xffLL & aKey[offset+18])<<24); - case 18: c+=((0xffLL & aKey[offset+17])<<16); - case 17: c+=((0xffLL & aKey[offset+16])<<8); + case 23: c+=((0xffLL & aKey[offset+22])<<56); [[fallthrough]]; + case 22: c+=((0xffLL & aKey[offset+21])<<48); [[fallthrough]]; + case 21: c+=((0xffLL & aKey[offset+20])<<40); [[fallthrough]]; + case 20: c+=((0xffLL & aKey[offset+19])<<32); [[fallthrough]]; + case 19: c+=((0xffLL & aKey[offset+18])<<24); [[fallthrough]]; + case 18: c+=((0xffLL & aKey[offset+17])<<16); [[fallthrough]]; + case 17: c+=((0xffLL & aKey[offset+16])<<8); [[fallthrough]]; // the first byte of c is reserved for the length - case 16: b+=((0xffLL & aKey[offset+15])<<56); - case 15: b+=((0xffLL & aKey[offset+14])<<48); - case 14: b+=((0xffLL & aKey[offset+13])<<40); - case 13: b+=((0xffLL & aKey[offset+12])<<32); - case 12: b+=((0xffLL & aKey[offset+11])<<24); - case 11: b+=((0xffLL & aKey[offset+10])<<16); - case 10: b+=((0xffLL & aKey[offset+ 9])<<8); - case 9: b+=( 0xffLL & aKey[offset+ 8]); - case 8: a+=((0xffLL & aKey[offset+ 7])<<56); - case 7: a+=((0xffLL & aKey[offset+ 6])<<48); - case 6: a+=((0xffLL & aKey[offset+ 5])<<40); - case 5: a+=((0xffLL & aKey[offset+ 4])<<32); - case 4: a+=((0xffLL & aKey[offset+ 3])<<24); - case 3: a+=((0xffLL & aKey[offset+ 2])<<16); - case 2: a+=((0xffLL & aKey[offset+ 1])<<8); - case 1: a+=( 0xffLL & aKey[offset+ 0]); + case 16: b+=((0xffLL & aKey[offset+15])<<56); [[fallthrough]]; + case 15: b+=((0xffLL & aKey[offset+14])<<48); [[fallthrough]]; + case 14: b+=((0xffLL & aKey[offset+13])<<40); [[fallthrough]]; + case 13: b+=((0xffLL & aKey[offset+12])<<32); [[fallthrough]]; + case 12: b+=((0xffLL & aKey[offset+11])<<24); [[fallthrough]]; + case 11: b+=((0xffLL & aKey[offset+10])<<16); [[fallthrough]]; + case 10: b+=((0xffLL & aKey[offset+ 9])<<8); [[fallthrough]]; + case 9: b+=( 0xffLL & aKey[offset+ 8]); [[fallthrough]]; + case 8: a+=((0xffLL & aKey[offset+ 7])<<56); [[fallthrough]]; + case 7: a+=((0xffLL & aKey[offset+ 6])<<48); [[fallthrough]]; + case 6: a+=((0xffLL & aKey[offset+ 5])<<40); [[fallthrough]]; + case 5: a+=((0xffLL & aKey[offset+ 4])<<32); [[fallthrough]]; + case 4: a+=((0xffLL & aKey[offset+ 3])<<24); [[fallthrough]]; + case 3: a+=((0xffLL & aKey[offset+ 2])<<16); [[fallthrough]]; + case 2: a+=((0xffLL & aKey[offset+ 1])<<8); [[fallthrough]]; + case 1: a+=( 0xffLL & aKey[offset+ 0]); [[fallthrough]]; // case 0: nothing left to add } |