diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-06-22 08:33:20 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-06-22 10:39:22 -0700 |
commit | 9986e125eba4642da82607d1d79ef29e7757a70e (patch) | |
tree | 1705b84a585cb1bcfcfafb0ab321bf0c1105eea6 /src | |
parent | 00f2317254576e4873e9c3f3131b885ce3f9d88d (diff) |
Replace "fall through" comments with Q_FALLTHROUGH
Noted by GCC 11. Looks like it doesn't see the "fall through" comment
(only "fallthrough").
Change-Id: I7246c3e7bb894e0d9521fffd168af15da21a2c93
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index f7c4e2c98f..548b8e7548 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1533,7 +1533,7 @@ bool Codegen::visit(BinaryExpression *ast) setExprResult(binopHelper(static_cast<QSOperator::Op>(ast->op), right, left)); break; } - // intentional fall-through! + Q_FALLTHROUGH(); case QSOperator::In: case QSOperator::InstanceOf: case QSOperator::As: @@ -2260,7 +2260,7 @@ bool Codegen::visit(DeleteExpression *ast) case Reference::StackSlot: if (!expr.stackSlotIsLocalOrArgument) break; - // fall through + Q_FALLTHROUGH(); case Reference::ScopedLocal: // Trying to delete a function argument might throw. if (_context->isStrict) { diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index a168b0e580..0ae7fbb180 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -2327,7 +2327,7 @@ Bool Runtime::CompareEqual::call(const Value &left, const Value &right) case QV4::Value::QT_Bool: case QV4::Value::QT_Int: rhs = Value::fromDouble(rhs.int_32()); - // fall through + Q_FALLTHROUGH(); default: // double if (lhs.m()->internalClass->vtable->isStringOrSymbol) { return lhs.m()->internalClass->vtable->isString ? (RuntimeHelpers::toNumber(lhs) == rhs.doubleValue()) : false; |