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::uno::Reference<com::sun::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>
This commit is contained in:
dante
2021-02-03 10:58:16 +01:00
committed by Noel Grandin
parent 618f562346
commit 99ffc6fbb3

View File

@@ -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));
}