summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-02-24 11:02:04 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-02-24 19:23:38 +0100
commit1ca7e41fa8e300d0f5b8e0427ea3e6cad27ce175 (patch)
tree5d98bfd7793673962079aaf449f1e47874d6e524 /sd
parent589abe39262a37fb1205fac229d7004ee01dd3f9 (diff)
workaround GCC 9.2.1 -Og -Werror=maybe-uninitialized
vcl/unx/generic/gdi/salbmp.cxx:727:32: error: ‘pixmapHandle’ may be used uninitialized in this function [-Werror=maybe-uninitialized] vcl/unx/gtk3/gtk3gtkinst.cxx:7336:16: error: ‘eRet’ may be used uninitialized in this function [-Werror=maybe-uninitialized] etc. One looks like it might occur in practice. Change-Id: I09af7d36b134b31cb7bd8047b5c73f4a49c9d9b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89351 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/pptx-animations.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx
index f809b6222484..0badff184841 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -101,8 +101,8 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
return;
}
- sal_uInt32 nRgb;
- double fDouble;
+ sal_Int32 nRgb = {}; // spurious -Werror=maybe-uninitialized
+ double fDouble = {}; // spurious -Werror=maybe-uninitialized
TypeClass aClass = rAny.getValueType().getTypeClass();
bool bWriteToken
@@ -115,11 +115,17 @@ void WriteAnimationProperty(const FSHelperPtr& pFS, const Any& rAny, sal_Int32 n
switch (rAny.getValueType().getTypeClass())
{
case TypeClass_LONG:
- rAny >>= nRgb;
+ if (!(rAny >>= nRgb))
+ {
+ assert(false);
+ }
pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nRgb));
break;
case TypeClass_DOUBLE:
- rAny >>= fDouble;
+ if (!(rAny >>= fDouble))
+ {
+ assert(false);
+ }
pFS->singleElementNS(XML_p, XML_fltVal, XML_val, OString::number(fDouble));
break;
case TypeClass_STRING: