From f59dd9c2d928432ae2ebc311cdfe65dc74f3db33 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 11 Feb 2021 07:52:26 +0100 Subject: Silence some -Wimplicit-fallthrough ("fallthrough annotation in unreachable code") Change-Id: I707451cf7f5215e228763049b9903240de1987cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110747 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- unoidl/source/sourceprovider-parser.y | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'unoidl/source') diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 565ac9d8dec9..9d1dd5ae49d0 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -16,6 +16,7 @@ #include +#include #include #include @@ -1923,8 +1924,7 @@ typedefDefn: case unoidl::detail::SourceProviderEntity::KIND_PUBLISHED_INTERFACE_DECL: break; case unoidl::detail::SourceProviderEntity::KIND_MODULE: - assert(false && "this cannot happen"); - [[fallthrough]]; + O3TL_UNREACHABLE; default: assert(t.entity->entity.is() || t.entity->pad.is()); unpub @@ -1943,8 +1943,7 @@ typedefDefn: } break; case unoidl::detail::SourceProviderType::TYPE_PARAMETER: - assert(false && "this cannot happen"); - [[fallthrough]]; + O3TL_UNREACHABLE; default: break; } @@ -3855,8 +3854,7 @@ type: ok = true; break; case unoidl::Entity::SORT_TYPEDEF: - assert(false && "this cannot happen"); - [[fallthrough]]; + O3TL_UNREACHABLE; default: break; } @@ -4441,8 +4439,7 @@ bool parse(OUString const & uri, SourceProviderScannerData * data) { case 0: break; default: - assert(false); - [[fallthrough]]; + O3TL_UNREACHABLE; case 1: throw FileFormatException( uri, -- cgit