From 6570d5600918c07a4f54b86b1f52e6c4d1964f0c Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 13 Nov 2024 16:29:05 +0100 Subject: [PATCH] tdf#163486: PVS: variable is used after being declared Since commit 400d5d8a90f1f2737f87b7011294cddb8071768f Author: Miklos Vajna Date: Wed Nov 13 10:35:36 2013 +0100 oox: initial import of wps:wsp V614 The 'pMasterShape' smart pointer is utilized immediately after being declared or reset. It is suspicious that no value was assigned to it. Consider checking the third actual argument of the 'WpsContext' function. Change-Id: I1e14be0a528e01acbfa2d3e79d5a4d03e4b3e268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176552 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- oox/source/shape/ShapeContextHandler.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index e34f5be34700..356910cc6404 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -113,7 +113,6 @@ uno::Reference ShapeContextHandler::getWpsContext if (!mxWpsContext.is()) { FragmentHandler2Ref rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, msRelationFragmentPath)); - ShapePtr pMasterShape; uno::Reference xShape; // No element happens in case of pretty-printed XML, bodyPr is the case when we are called again after . @@ -127,7 +126,7 @@ uno::Reference ShapeContextHandler::getWpsContext mxWpsContext.set(new WpsContext( *rFragmentHandler, xShape, - pMasterShape, + nullptr, std::make_shared( "com.sun.star.drawing.CustomShape"))); break;