From fe7b45e3744799e1076c4bbbc1d7ca08fd9d2e0b Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 29 Jun 2023 12:34:14 +0200 Subject: [PATCH] Json: Fix two fallthrough warnings gcc 12.2.0 says warning: this statement may fall through [-Wimplicit-fallthrough=] Change-Id: I2deec77b4a79d3ef62339fb71f5ce5b52e2b9ee5 Reviewed-by: Qt CI Bot Reviewed-by: Eike Ziller --- src/shared/json/json.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/json/json.cpp b/src/shared/json/json.cpp index 4f9c94ef376..759fea61f92 100644 --- a/src/shared/json/json.cpp +++ b/src/shared/json/json.cpp @@ -4806,7 +4806,7 @@ bool Value::isValid(const Base *b) const case JsonValue::Double: if (intValue) break; - // fall through + [[fallthrough]]; case JsonValue::String: case JsonValue::Array: case JsonValue::Object: @@ -4885,7 +4885,7 @@ uint32_t Value::valueToStore(const JsonValue &v, uint32_t offset) if (c != INT_MAX) return c; } - // fall through + [[fallthrough]]; case JsonValue::String: case JsonValue::Array: case JsonValue::Object: