Gcc 7 fallthrough

Summary:
hopefully the last of the gcc-7 compile errors
Closes https://github.com/facebook/rocksdb/pull/1675

Differential Revision: D4332106

Pulled By: IslamAbdelRahman

fbshipit-source-id: 139448c
main
Daniel Black 8 years ago committed by Facebook Github Bot
parent 477b6ea578
commit b7239bf7e0
  1. 16
      util/murmurhash.cc
  2. 1
      utilities/document/json_document.cc

@ -46,12 +46,12 @@ uint64_t MurmurHash64A ( const void * key, int len, unsigned int seed )
switch(len & 7)
{
case 7: h ^= ((uint64_t)data2[6]) << 48;
case 6: h ^= ((uint64_t)data2[5]) << 40;
case 5: h ^= ((uint64_t)data2[4]) << 32;
case 4: h ^= ((uint64_t)data2[3]) << 24;
case 3: h ^= ((uint64_t)data2[2]) << 16;
case 2: h ^= ((uint64_t)data2[1]) << 8;
case 7: h ^= ((uint64_t)data2[6]) << 48; // fallthrough
case 6: h ^= ((uint64_t)data2[5]) << 40; // fallthrough
case 5: h ^= ((uint64_t)data2[4]) << 32; // fallthrough
case 4: h ^= ((uint64_t)data2[3]) << 24; // fallthrough
case 3: h ^= ((uint64_t)data2[2]) << 16; // fallthrough
case 2: h ^= ((uint64_t)data2[1]) << 8; // fallthrough
case 1: h ^= ((uint64_t)data2[0]);
h *= m;
};
@ -167,8 +167,8 @@ unsigned int MurmurHashNeutral2 ( const void * key, int len, unsigned int seed )
switch(len)
{
case 3: h ^= data[2] << 16;
case 2: h ^= data[1] << 8;
case 3: h ^= data[2] << 16; // fallthrough
case 2: h ^= data[1] << 8; // fallthrough
case 1: h ^= data[0];
h *= m;
};

@ -287,7 +287,6 @@ JSONDocument::Type JSONDocument::type() const {
return JSONDocument::kArray;
case fbson::FbsonType::T_Binary:
assert(false);
default:
assert(false);
}

Loading…
Cancel
Save