[Libreoffice-commits] core.git: unoidl/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 11 07:46:09 UTC 2021
unoidl/source/sourceprovider-parser.y | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
New commits:
commit f59dd9c2d928432ae2ebc311cdfe65dc74f3db33
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Feb 11 07:52:26 2021 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Feb 11 08:45:01 2021 +0100
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 <sbergman at redhat.com>
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 <sal/config.h>
+#include <o3tl/unreachable.hxx>
#include <rtl/ustrbuf.hxx>
#include <unoidl/unoidl.hxx>
@@ -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,
More information about the Libreoffice-commits
mailing list