diff options
17 files changed, 63 insertions, 64 deletions
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index 0e46021e901..2a8a66f41d9 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -164,7 +164,7 @@ GetConfig::Main() break; case 'h': retval = 0; - [[fallthrough]]; + //@fallthrough@ case '?': default: usage(); diff --git a/document/src/vespa/document/select/valuenodes.cpp b/document/src/vespa/document/select/valuenodes.cpp index d334f4b955e..4c6f5246fde 100644 --- a/document/src/vespa/document/select/valuenodes.cpp +++ b/document/src/vespa/document/select/valuenodes.cpp @@ -999,8 +999,8 @@ ArithmeticValueNode::getValue(std::unique_ptr<Value> lval, return std::unique_ptr<Value>(new StringValue( slval.getValue() + srval.getValue())); } - [[fallthrough]]; } + //@fallthrough@ case SUB: case MUL: case DIV: @@ -1049,8 +1049,8 @@ ArithmeticValueNode::getValue(std::unique_ptr<Value> lval, } return std::unique_ptr<Value>(new FloatValue(res)); } - [[fallthrough]]; } + //@fallthrough@ case MOD: { if (lval->getType() == Value::Integer && @@ -1064,8 +1064,8 @@ ArithmeticValueNode::getValue(std::unique_ptr<Value> lval, throw vespalib::IllegalArgumentException("Division by zero"); } } - [[fallthrough]]; } + //@fallthrough@ } return std::unique_ptr<Value>(new InvalidValue); } @@ -1089,8 +1089,8 @@ ArithmeticValueNode::traceValue(std::unique_ptr<Value> lval, << "' -> '" << *result << "'.\n"; return result; } - [[fallthrough]]; } + //@fallthrough@ case SUB: case MUL: case DIV: @@ -1135,8 +1135,8 @@ ArithmeticValueNode::traceValue(std::unique_ptr<Value> lval, << "\n"; return result; } - [[fallthrough]]; } + //@fallthrough@ case MOD: { if (lval->getType() == Value::Integer && @@ -1151,8 +1151,8 @@ ArithmeticValueNode::traceValue(std::unique_ptr<Value> lval, << "\n"; return result; } - [[fallthrough]]; } + //@fallthrough@ } out << "Failed to do operation " << getOperatorName() << " on values of type " << lval->getType() << " and " diff --git a/fastlib/src/vespa/fastlib/util/base64.cpp b/fastlib/src/vespa/fastlib/util/base64.cpp index 8b9ac45e698..1b7889d8c47 100644 --- a/fastlib/src/vespa/fastlib/util/base64.cpp +++ b/fastlib/src/vespa/fastlib/util/base64.cpp @@ -90,7 +90,7 @@ Fast_Base64::Decode(const char *source, unsigned int length, char *destination) if (symbol != '=' || i == length) return -1; symbol = source[++i]; - [[fallthrough]]; + //@fallthrough@ case 3: for (; i < length; ++i) { symbol = source[i]; if (symbol == '\0') diff --git a/fbench/src/filterfile/filterfile.cpp b/fbench/src/filterfile/filterfile.cpp index 1f467d127e0..918d62215e6 100644 --- a/fbench/src/filterfile/filterfile.cpp +++ b/fbench/src/filterfile/filterfile.cpp @@ -133,7 +133,7 @@ main(int argc, char** argv) break; case 1: buf[outIdx++] = line[idx]; - [[fallthrough]]; + //@fallthrough@ case 2: if (line[idx++] == '&') state = 0; diff --git a/filedistribution/src/apps/status/status-filedistribution.cpp b/filedistribution/src/apps/status/status-filedistribution.cpp index f51454d438b..52cabdfcb2d 100644 --- a/filedistribution/src/apps/status/status-filedistribution.cpp +++ b/filedistribution/src/apps/status/status-filedistribution.cpp @@ -78,7 +78,7 @@ int printStatus(const std::string& zkservers) break; case HostStatus::inProgress: hasStarted = true; - [[fallthrough]]; + //@fallthrough@ case HostStatus::notStarted: notFinishedHosts[host] = hostStatus; break; diff --git a/fsa/src/vespa/fsa/segmenter.cpp b/fsa/src/vespa/fsa/segmenter.cpp index 3bcb3f1b489..d13249a5ce8 100644 --- a/fsa/src/vespa/fsa/segmenter.cpp +++ b/fsa/src/vespa/fsa/segmenter.cpp @@ -77,16 +77,16 @@ void Segmenter::Segments::buildSegmentation(Segmenter::SegmentationMethod method switch(method){ case SEGMENTATION_WEIGHTED_BIAS100: bias+=50; - [[fallthrough]]; + //@fallthrough@ case SEGMENTATION_WEIGHTED_BIAS50: bias+=30; - [[fallthrough]]; + //@fallthrough@ case SEGMENTATION_WEIGHTED_BIAS20: bias+=10; - [[fallthrough]]; + //@fallthrough@ case SEGMENTATION_WEIGHTED_BIAS10: bias+=10; - [[fallthrough]]; + //@fallthrough@ case SEGMENTATION_WEIGHTED: bestid=-1; for(i=n_txt;i>=0;i--){ diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index 0514ba5ebc1..11f6eb306eb 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -461,18 +461,17 @@ public: default: case 4: r |= _data[a._idx + a._pos + 3] << 0; - [[fallthrough]]; + //@fallthrough@ case 3: r |= _data[a._idx + a._pos + 2] << 8; - [[fallthrough]]; + //@fallthrough@ case 2: r |= _data[a._idx + a._pos + 1] << 16; - [[fallthrough]]; + //@fallthrough@ case 1: r |= _data[a._idx + a._pos + 0] << 24; - [[fallthrough]]; - case 0: - [[fallthrough]]; + //@fallthrough@ + case 0:; } 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 7645a041cad..5b295e8bb41 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); [[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]]; + 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); [[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 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 } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp index fe766bb2889..4bdf91e9434 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp @@ -49,7 +49,7 @@ ResType inferType(const IAttributeVector & vec) { switch (t) { case BasicType::TENSOR: retval = RES_TENSOR; - [[fallthrough]]; + //@fallthrough@ default: retval = RES_STRING; } diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp index ebeda4f1b8b..8fd96153dd7 100644 --- a/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp +++ b/staging_vespalib/src/vespa/vespalib/util/jsonwriter.cpp @@ -56,7 +56,7 @@ JSONWriter::quote(const char * str, size_t len) case '\"': case '\\': v[j++] = '\\'; - [[fallthrough]]; + //@fallthrough@ default: v[j++] = str[i]; break; diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 5defe2c5ae8..16f3886c813 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -868,7 +868,7 @@ FileStorHandlerImpl::remapMessage( } // Follow onto next to move queue or fail } - [[fallthrough]]; + //@fallthrough@ case api::MessageType::SPLITBUCKET_ID: // Move to correct queue if op == MOVE // Fail with bucket not found if op is JOIN @@ -955,7 +955,7 @@ FileStorHandlerImpl::remapMessage( break; case GetIterCommand::ID: bucket = static_cast<GetIterCommand&>(msg).getBucketId(); - [[fallthrough]]; + //@fallthrough@ case RepairBucketCommand::ID: if (bucket.getRawId() == 0) { bucket = static_cast<RepairBucketCommand&>(msg) diff --git a/vdslib/src/vespa/vdslib/state/diskstate.cpp b/vdslib/src/vespa/vdslib/state/diskstate.cpp index 39ebe1e0ca0..9a4da5b8f59 100644 --- a/vdslib/src/vespa/vdslib/state/diskstate.cpp +++ b/vdslib/src/vespa/vdslib/state/diskstate.cpp @@ -64,7 +64,7 @@ DiskState::DiskState(const vespalib::stringref & serialized) "must be a positive floating point number", VESPA_STRLOC); } - [[fallthrough]]; + //@fallthrough@ case 'm': if (key.size() > 1) break; _description = document::StringUtil::unescape(value); 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<uint32_t>(k[10]) << 24); [[fallthrough]]; - case 10: c += (static_cast<uint32_t>(k[9]) << 16); [[fallthrough]]; - case 9 : c += (static_cast<uint32_t>(k[8]) << 8); [[fallthrough]]; + case 11: c += (static_cast<uint32_t>(k[10]) << 24); //@fallthrough@ + case 10: c += (static_cast<uint32_t>(k[9]) << 16); //@fallthrough@ + case 9 : c += (static_cast<uint32_t>(k[8]) << 8); //@fallthrough@ /* the first byte of c is reserved for the length */ - case 8 : b += (static_cast<uint32_t>(k[7]) << 24); [[fallthrough]]; - case 7 : b += (static_cast<uint32_t>(k[6]) << 16); [[fallthrough]]; - case 6 : b += (static_cast<uint32_t>(k[5]) << 8); [[fallthrough]]; - case 5 : b += k[4]; [[fallthrough]]; - case 4 : a += (static_cast<uint32_t>(k[3]) << 24); [[fallthrough]]; - case 3 : a += (static_cast<uint32_t>(k[2]) << 16); [[fallthrough]]; - case 2 : a += (static_cast<uint32_t>(k[1]) << 8); [[fallthrough]]; - case 1 : a += k[0]; [[fallthrough]]; + case 8 : b += (static_cast<uint32_t>(k[7]) << 24); //@fallthrough@ + case 7 : b += (static_cast<uint32_t>(k[6]) << 16); //@fallthrough@ + case 6 : b += (static_cast<uint32_t>(k[5]) << 8); //@fallthrough@ + case 5 : b += k[4]; //@fallthrough@ + case 4 : a += (static_cast<uint32_t>(k[3]) << 24); //@fallthrough@ + case 3 : a += (static_cast<uint32_t>(k[2]) << 16); //@fallthrough@ + case 2 : a += (static_cast<uint32_t>(k[1]) << 8); //@fallthrough@ + case 1 : a += k[0]; //@fallthrough@ /* case 0: nothing left to add */ } bobhash_mix(a,b,c); diff --git a/vespalog/src/logctl/logctl.cpp b/vespalog/src/logctl/logctl.cpp index a0963b43c34..111dfa071bb 100644 --- a/vespalog/src/logctl/logctl.cpp +++ b/vespalog/src/logctl/logctl.cpp @@ -116,10 +116,10 @@ main(int argc, char **argv) break; case 'r': doResetLevels = true; - [[fallthrough]]; + //@fallthrough@ case 'c': shouldCreateFile = true; - [[fallthrough]]; + //@fallthrough@ case 'n': shouldCreateEntry = true; break; diff --git a/vsm/src/vespa/vsm/vsm/docsumfilter.cpp b/vsm/src/vespa/vsm/vsm/docsumfilter.cpp index 9e37a13ee00..7b840407771 100644 --- a/vsm/src/vespa/vsm/vsm/docsumfilter.cpp +++ b/vsm/src/vespa/vsm/vsm/docsumfilter.cpp @@ -200,7 +200,7 @@ DocsumFilter::getFieldValue(const DocsumFieldSpec::FieldIdentifier & fieldId, return _cachedValue.get(); } } - [[fallthrough]]; + //@fallthrough@ default: return fv; } diff --git a/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp b/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp index f6ad9117abb..dd208b1ca48 100644 --- a/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp +++ b/vsm/src/vespa/vsm/vsm/fieldsearchspec.cpp @@ -46,7 +46,7 @@ FieldSearchSpec::FieldSearchSpec(const FieldIdT & fid, const vespalib::string & switch(searchDef) { default: LOG(warning, "Unknown searchdef = %d. Defaulting to AUTOUTF8", searchDef); - [[fallthrough]]; + //@fallthrough@ case VsmfieldsConfig::Fieldspec::AUTOUTF8: case VsmfieldsConfig::Fieldspec::NONE: case VsmfieldsConfig::Fieldspec::SSE2UTF8: |