From c26994ff1551aa5450383cc51bed9b4d39f973f7 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 29 Feb 2024 09:30:24 +0800 Subject: Fix -Wimplicit-fallthrough for clang Clang's `-Wimplicit-fallthrough` warnings are a little stricter than gcc's interpretation: switch (i) { case 0: foo(); case 4: break; } While gcc accepts the implicit fallthrough, if the following statement is a trivial `break`, clang will warn about it. Pick-to: 6.7 Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0 Reviewed-by: Volker Hilsheimer --- src/3rdparty/tinycbor/src/cborparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/3rdparty/tinycbor') diff --git a/src/3rdparty/tinycbor/src/cborparser.c b/src/3rdparty/tinycbor/src/cborparser.c index 74d91a30e0..80c44c7e13 100644 --- a/src/3rdparty/tinycbor/src/cborparser.c +++ b/src/3rdparty/tinycbor/src/cborparser.c @@ -232,7 +232,7 @@ static CborError preparse_value(CborValue *it) case SinglePrecisionFloat: case DoublePrecisionFloat: it->flags |= CborIteratorFlag_IntegerValueTooLarge; - /* fall through */ + Q_FALLTHROUGH(); case TrueValue: case NullValue: case UndefinedValue: -- cgit v1.2.3