New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Wed Aug 5 15:05:53 PDT 2015


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

2 new defect(s) introduced to LibreOffice found with Coverity Scan.
19 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/shape/WpsContext.cxx: 103 in oox::shape::WpsContext::onCreateContext(int, const oox::AttributeList &)()


________________________________________________________________________________________________________
*** CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/shape/WpsContext.cxx: 103 in oox::shape::WpsContext::onCreateContext(int, const oox::AttributeList &)()
97                         double fRotate = 0;
98                         double fShearX = 0;
99                         aTransformation.decompose(aScale, aTranslate, fRotate, fShearX);
100     
101                         // If the text is not rotated the way the shape wants it already, set the angle.
102                         const sal_Int32 nRotation = -270;
>>>     CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
>>>     Dividing integer expressions "NormAngle360(-27000L)" and "100L", and then converting the integer quotient to type "double". Any remainder, or fractional part of the quotient, is ignored.
103                         if (basegfx::rad2deg(fRotate) != NormAngle360(nRotation * 100) / 100)
104                         {
105                             comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
106                             aCustomShapeGeometry["TextPreRotateAngle"] = uno::makeAny(nRotation);
107                             xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList()));
108                         }

** CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function<void (OutputDevice *)>::function<boost::_bi::bind_t<void, boost::_mfi::mf4<void, OutputDevice, const GDIMetaFile &, const Point &, const Size &, const Gradient &>, boost::_bi::list5<boost::arg<(int)1>, boost::_bi::value<GDIMetaFile>, boost::_bi::value<Point>, boost::_bi::value<Size>, boost::_bi::value<Gradient>>>, void>(T1)()


________________________________________________________________________________________________________
*** CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function<void (OutputDevice *)>::function<boost::_bi::bind_t<void, boost::_mfi::mf4<void, OutputDevice, const GDIMetaFile &, const Point &, const Size &, const Gradient &>, boost::_bi::list5<boost::arg<(int)1>, boost::_bi::value<GDIMetaFile>, boost::_bi::value<Point>, boost::_bi::value<Size>, boost::_bi::value<Gradient>>>, void>(T1)()
2245     	}
2246         }
2247     
2248       template<typename _Res, typename... _ArgTypes>
2249         template<typename _Functor, typename>
2250           function<_Res(_ArgTypes...)>::
>>>     CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
>>>     Passing parameter __f of type "boost::_bi::bind_t<void, boost::_mfi::mf4<void, OutputDevice, GDIMetaFile const &, Point const &, Size const &, Gradient const &>, boost::_bi::list5<boost::arg<1>, boost::_bi::value<GDIMetaFile>, boost::_bi::value<Point>, boost::_bi::value<Size>, boost::_bi::value<Gradient> > >" (size 168 bytes) by value.
2251           function(_Functor __f)
2252           : _Function_base()
2253           {
2254     	typedef _Function_handler<_Signature_type, _Functor> _My_handler;
2255     
2256     	if (_My_handler::_M_not_empty_function(__f))


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/211?tab=overview

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939



More information about the LibreOffice mailing list