summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-03 14:55:29 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-03 14:13:57 +0100
commit2a3f5d11522cd69f0ce221cde3a63b7e85e94b53 (patch)
tree51a9483a42769f64fff5b329af6604cdf5a5f7ff /oox
parentColibre icons: add missing calc icons (diff)
downloadcore-2a3f5d11522cd69f0ce221cde3a63b7e85e94b53.tar.gz
core-2a3f5d11522cd69f0ce221cde3a63b7e85e94b53.zip
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: I856345576ff5c10a41509a97ad4539272bd55568 Reviewed-on: https://gerrit.libreoffice.org/62803 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index aa52b0e07e65..80630b4c4d90 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3589,7 +3589,8 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
sal_Int32 nSymbol = aSymbol.StandardSymbol;
// TODO: more properties support for marker
- const char* pSymbolType = nullptr;
+ const char* pSymbolType; // no initialization here, to let compiler warn if we have a code path
+ // where it stays uninitialized
switch( nSymbol )
{
case 0:
@@ -3631,12 +3632,7 @@ void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
pSymbolType = "none";
}
- if( pSymbolType )
- {
- pFS->singleElement( FSNS( XML_c, XML_symbol ),
- XML_val, pSymbolType,
- FSEND );
- }
+ pFS->singleElement(FSNS(XML_c, XML_symbol), XML_val, pSymbolType, FSEND);
if (!bSkipFormatting)
{