diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-06-17 15:47:59 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-23 11:51:44 +0200 |
commit | 88db4aaf0636eb7569272fcccce0fde78cef9873 (patch) | |
tree | b98bc6e10311f7da96c60a1625677d6962c30831 /sd | |
parent | f34cf6a2e67e75f83498b3a1890668784416bde2 (diff) |
avoid maybe-uninitialized in PowerPointShapeExport
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx: In member
function ‘oox::drawingml::ShapeExport&
oox::core::PowerPointShapeExport::WritePlaceholderReferenceTextBody(oox::core::PlaceholderType,
PageType,
com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)’:
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1715:31:
error: ‘nDateTimeFormat’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
1715 | SvxTimeFormat eTime =
static_cast<SvxTimeFormat>(nDateTimeFormat >> 4);
| ^~~~~
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1707:36:
error: ‘bIsDateTimeFixed’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
1707 | if(ePageType != LAYOUT && !bIsDateTimeFixed)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Change-Id: I7f622321680705fb0b0fa42630949c8d6af8488e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117398
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 3c24e7ed972ae2fc431365e4884e27c0b243c905)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117643
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 9299dad777df..31f3710817aa 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1622,12 +1622,12 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody( case DateAndTime: { OUString aDateTimeType = "datetime1"; - bool bIsDateTimeFixed; + bool bIsDateTimeFixed = false; xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed; if(ePageType != LAYOUT && !bIsDateTimeFixed) { - sal_Int32 nDateTimeFormat; + sal_Int32 nDateTimeFormat = 0; xPagePropSet->getPropertyValue("DateTimeFormat") >>= nDateTimeFormat; // 4 LSBs represent the date |