summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-12-06 16:32:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-12-06 19:21:47 +0100
commitea0d55fa45173a5fa5f53f421615298f80b42a78 (patch)
tree9e7766770b2cc0887bb5a61e41f08d4e660a7ef6
parentRevert "cid1494597 silence Uncaught exception" (diff)
downloadcore-ea0d55fa45173a5fa5f53f421615298f80b42a78.tar.gz
core-ea0d55fa45173a5fa5f53f421615298f80b42a78.zip
Work around two -Werror=implicit-fallthrough=
...that started to crop up with recent GCC 12 trunk (where it expanded the ENSURE_OR_THROW macro, but apparently didn't take into account that its > 97 | if( !(c) ){ \ > | ^~ will always be taken in these cases where the c argument is false), and can easily be avoided by getting rid of those uses of ENSURE_OR_THROW(false, "...") (And while at it, move the default case to a more reasonable position in mtftools.cxx, obsoleting the FALLTHROUGH comment in any case.) Change-Id: I8189d98b361e6725096d0968f3e0e604fb84e591 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126452 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--cppcanvas/source/mtfrenderer/mtftools.cxx7
-rw-r--r--slideshow/source/engine/animationnodes/animationtransformnode.cxx4
2 files changed, 5 insertions, 6 deletions
diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx
index c5d36eb00652..0181fa78ec9c 100644
--- a/cppcanvas/source/mtfrenderer/mtftools.cxx
+++ b/cppcanvas/source/mtfrenderer/mtftools.cxx
@@ -61,10 +61,6 @@ namespace cppcanvas::tools
return ::Size( 0,
aMetric.GetInternalLeading() + aMetric.GetAscent() );
- default:
- ENSURE_OR_THROW( false,
- "tools::getBaselineOffset(): Unexpected TextAlign value" );
- // FALLTHROUGH intended (to calm compiler warning - case won't happen)
case ALIGN_BASELINE:
return ::Size( 0, 0 );
@@ -72,6 +68,9 @@ namespace cppcanvas::tools
return ::Size( 0,
-aMetric.GetDescent() );
+ default:
+ throw css::uno::RuntimeException(
+ "tools::getBaselineOffset(): Unexpected TextAlign value" );
}
}
diff --git a/slideshow/source/engine/animationnodes/animationtransformnode.cxx b/slideshow/source/engine/animationnodes/animationtransformnode.cxx
index 624bad401e8b..cbb68b024316 100644
--- a/slideshow/source/engine/animationnodes/animationtransformnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationtransformnode.cxx
@@ -45,8 +45,8 @@ AnimationActivitySharedPtr AnimationTransformNode::createActivity() const
switch( nTransformType )
{
default:
- ENSURE_OR_THROW(
- false, "AnimationTransformNode::createTransformActivity(): "
+ throw css::uno::RuntimeException(
+ "AnimationTransformNode::createTransformActivity(): "
"Unknown transform type" );
case animations::AnimationTransformType::TRANSLATE: