[Libreoffice-commits] core.git: slideshow/source vcl/unx xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 25 14:48:29 UTC 2020
slideshow/source/engine/animationnodes/animationphysicsnode.cxx | 16 ++--------
vcl/unx/gtk3/gtk3gtkinst.cxx | 4 +-
xmloff/source/draw/animationexport.cxx | 2 -
3 files changed, 7 insertions(+), 15 deletions(-)
New commits:
commit ff87ef83edf77ba0a9bf11bb8e5306e3b8c7cb04
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Aug 25 15:26:10 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 25 16:47:46 2020 +0200
-Werror=maybe-uninitialized
which only shows up in an optimised build, using gcc
Change-Id: I16015c7d139680aba11bf183c3e2bceb79c9ecba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101330
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
index 3c7c227f2d0c..c750d333322a 100644
--- a/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationphysicsnode.cxx
@@ -41,39 +41,31 @@ AnimationActivitySharedPtr AnimationPhysicsNode::createActivity() const
"Couldn't get the animation duration.");
::css::uno::Any aTemp;
- double fStartVelocityX;
+ double fStartVelocityX = fDefaultStartVelocityX;
aTemp = mxPhysicsMotionNode->getStartVelocityX();
if (aTemp.hasValue())
aTemp >>= fStartVelocityX;
- else
- fStartVelocityX = fDefaultStartVelocityX;
- double fStartVelocityY;
+ double fStartVelocityY = fDefaultStartVelocityY;
aTemp = mxPhysicsMotionNode->getStartVelocityY();
if (aTemp.hasValue())
aTemp >>= fStartVelocityY;
- else
- fStartVelocityY = fDefaultStartVelocityY;
- double fDensity;
+ double fDensity = fDefaultDensity;
aTemp = mxPhysicsMotionNode->getDensity();
if (aTemp.hasValue())
{
aTemp >>= fDensity;
fDensity = (fDensity < 0.0) ? 0.0 : fDensity;
}
- else
- fDensity = fDefaultDensity;
- double fBounciness;
+ double fBounciness = fDefaultBounciness;
aTemp = mxPhysicsMotionNode->getBounciness();
if (aTemp.hasValue())
{
aTemp >>= fBounciness;
fBounciness = std::clamp(fBounciness, 0.0, 1.0);
}
- else
- fBounciness = fDefaultBounciness;
ActivitiesFactory::CommonParameters const aParms(fillCommonParameters());
return ActivitiesFactory::createSimpleActivity(
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 19cffc2640c3..c6e557a69275 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8981,7 +8981,7 @@ public:
virtual void set_alignment(TxtAlign eXAlign) override
{
- gfloat xalign;
+ gfloat xalign = 0;
switch (eXAlign)
{
case TxtAlign::Left:
@@ -12879,7 +12879,7 @@ public:
virtual void set_alignment(TxtAlign eXAlign) override
{
- GtkJustification eJust;
+ GtkJustification eJust = GTK_JUSTIFY_LEFT;
switch (eXAlign)
{
case TxtAlign::Left:
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index c130f5a45919..af0ea3828eb1 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1246,7 +1246,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
case AnimationNodeType::ANIMATEPHYSICS:
{
eElementToken = XML_ANIMATEPHYSICS;
- double fTemp;
+ double fTemp = 0;
Reference< XAnimatePhysics > xAnimatePhysics( xAnimate, UNO_QUERY_THROW );
aTemp = xAnimatePhysics->getStartVelocityX();
More information about the Libreoffice-commits
mailing list