diff options
author | dante <dante19031999@gmail.com> | 2021-02-03 10:58:16 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-04 19:50:40 +0100 |
commit | 99ffc6fbb3f1d33697a47d08277d99ddff81678f (patch) | |
tree | 8a91c7e28bbafad65c4420dc3e0f77252d662cb6 /oox | |
parent | 618f5623464cfd4be10b4d445910e7cf41b10e19 (diff) |
Fix -Wmaybe-uninitialized
Any operator >>= does not guarantee initialization.
(code was introduced with <https://git.libreoffice.org/core/+/11e52fe2979b0947814a49b9c17ec373795cbf8e%5E!/> "introduce Degree100 strong_int type")
.../libreoffice/oox/source/export/drawingml.cxx: In member function ‘void oox::drawingml::DrawingML::WriteShapeTransformation(const com::sun::star::uno::Reference<com::sun::star::drawing::XShape>&, sal_Int32, bool, bool, bool, bool, bool)’:
...s/libreoffice/oox/source/export/drawingml.cxx:1790:79: warning: ‘nTmp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1790 | nCameraRotation = NormAngle36000(Degree100(nTmp / -600));
Change-Id: I93bee48bc050c29d831e78afcf62aef154c72fc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110341
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 54003cd32fc7..486fb90bd3ec 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1785,7 +1785,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa [](const PropertyValue& rProp) { return rProp.Name == "rotRev"; }); if (pZRotationProp != std::cend(aCameraProps)) { - sal_Int32 nTmp; + sal_Int32 nTmp = 0; pZRotationProp->Value >>= nTmp; nCameraRotation = NormAngle36000(Degree100(nTmp / -600)); } |