From b4be762630e273ab8913261ad8b2a0a38353de2f Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Mon, 24 Jul 2017 14:17:35 +0000 Subject: Use syntax that works for both gcc 7 and gcc 6. --- .../src/vespa/vespalib/data/slime/json_format.cpp | 2 +- vespalib/src/vespa/vespalib/util/bobhash.h | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'vespalib/src') diff --git a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp index 88b99725302..d6126667d68 100644 --- a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp +++ b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp @@ -426,7 +426,7 @@ JsonDecoder::decodeNumber(Inserter &inserter) switch (c) { case '+': case '-': case '.': case 'e': case 'E': isLong = false; - [[fallthrough]]; + //@fallthrough@ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': value.push_back(c); diff --git a/vespalib/src/vespa/vespalib/util/bobhash.h b/vespalib/src/vespa/vespalib/util/bobhash.h index 6c92896e538..1b1d0095be9 100644 --- a/vespalib/src/vespa/vespalib/util/bobhash.h +++ b/vespalib/src/vespa/vespalib/util/bobhash.h @@ -135,18 +135,18 @@ public: c += length; switch(len) /* all the case statements fall through */ { - case 11: c += (static_cast(k[10]) << 24); [[fallthrough]]; - case 10: c += (static_cast(k[9]) << 16); [[fallthrough]]; - case 9 : c += (static_cast(k[8]) << 8); [[fallthrough]]; + case 11: c += (static_cast(k[10]) << 24); //@fallthrough@ + case 10: c += (static_cast(k[9]) << 16); //@fallthrough@ + case 9 : c += (static_cast(k[8]) << 8); //@fallthrough@ /* the first byte of c is reserved for the length */ - case 8 : b += (static_cast(k[7]) << 24); [[fallthrough]]; - case 7 : b += (static_cast(k[6]) << 16); [[fallthrough]]; - case 6 : b += (static_cast(k[5]) << 8); [[fallthrough]]; - case 5 : b += k[4]; [[fallthrough]]; - case 4 : a += (static_cast(k[3]) << 24); [[fallthrough]]; - case 3 : a += (static_cast(k[2]) << 16); [[fallthrough]]; - case 2 : a += (static_cast(k[1]) << 8); [[fallthrough]]; - case 1 : a += k[0]; [[fallthrough]]; + case 8 : b += (static_cast(k[7]) << 24); //@fallthrough@ + case 7 : b += (static_cast(k[6]) << 16); //@fallthrough@ + case 6 : b += (static_cast(k[5]) << 8); //@fallthrough@ + case 5 : b += k[4]; //@fallthrough@ + case 4 : a += (static_cast(k[3]) << 24); //@fallthrough@ + case 3 : a += (static_cast(k[2]) << 16); //@fallthrough@ + case 2 : a += (static_cast(k[1]) << 8); //@fallthrough@ + case 1 : a += k[0]; //@fallthrough@ /* case 0: nothing left to add */ } bobhash_mix(a,b,c); -- cgit v1.2.3