aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-18 21:06:54 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-20 15:44:15 +0000
commitdf66e9264debda2ec6838e69e620a54847c71b0a (patch)
tree3693dc93d507b9ea9b5dac497b55fed82988168b /src/qml/jsruntime/qv4value.cpp
parent749a7212e903d8e8c6f256edb1836b9449cc7fe1 (diff)
Silence GCC 7 warnings about implicit fallthrough in Qt code
This only deals with Qt code. MASM has a lot of those left. We should just update from upstream instead to get the fixes. qv4regalloc.cpp:660:52: warning: this statement may fall through [-Wimplicit-fallthrough=] if (leftSource->type == DoubleType || rightSource->type == DoubleType) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qv4regalloc.cpp:666:13: note: here case OpBitAnd: ^~~~ Change-Id: I7814054a102a407d876ffffd14b6b0e2d6b03689 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4value.cpp')
-rw-r--r--src/qml/jsruntime/qv4value.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index e34ac9c764..f41442df7a 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -113,6 +113,7 @@ double Value::toNumberImpl() const
case QV4::Value::Managed_Type:
#ifdef V4_BOOTSTRAP
Q_UNIMPLEMENTED();
+ Q_FALLTHROUGH();
#else
if (String *s = stringValue())
return RuntimeHelpers::stringToNumber(s->toQString());
@@ -140,6 +141,7 @@ QString Value::toQStringNoThrow() const
switch (type()) {
case Value::Empty_Type:
Q_ASSERT(!"empty Value encountered");
+ Q_UNREACHABLE();
case Value::Undefined_Type:
return QStringLiteral("undefined");
case Value::Null_Type:
@@ -193,6 +195,7 @@ QString Value::toQString() const
switch (type()) {
case Value::Empty_Type:
Q_ASSERT(!"empty Value encountered");
+ Q_UNREACHABLE();
case Value::Undefined_Type:
return QStringLiteral("undefined");
case Value::Null_Type: