New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Feb 3 07:26:31 PST 2015
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
4 new defect(s) introduced to LibreOffice found with Coverity Scan.
51 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 4 of 4 defect(s)
** CID 1268022: Logically dead code (DEADCODE)
/vcl/workben/vcldemo.cxx: 413 in DemoRenderer::DrawText::drawText(OutputDevice &, Rectangle, bool, bool, bool)()
** CID 1268023: Logically dead code (DEADCODE)
/vcl/source/opengl/OpenGLHelper.cxx: 120 in addPreamble(rtl::OString &, const rtl::OString &)()
** CID 1268024: Uncaught exception (UNCAUGHT_EXCEPT)
/basctl/source/dlged/dlgedlist.cxx: 42 in basctl::DlgEdPropListenerImpl::propertyChange(const com::sun::star::beans::PropertyChangeEvent &)()
** CID 1268025: Uninitialized scalar field (UNINIT_CTOR)
/vcl/inc/sallayout.hxx: 304 in GlyphItem::GlyphItem(int, unsigned int, const Point &, long, int)()
________________________________________________________________________________________________________
*** CID 1268022: Logically dead code (DEADCODE)
/vcl/workben/vcldemo.cxx: 413 in DemoRenderer::DrawText::drawText(OutputDevice &, Rectangle, bool, bool, bool)()
407 nFontIndex=0;
408 nFontColorIndex=0;
409 }
410 else
411 {
412 // random font size to avoid buffering
>>> CID 1268022: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement: "nFontHeight = 1. + i * (0.9...".
413 nFontHeight = 1 + i * (0.9 + comphelper::rng::uniform_real_distribution(0.0, std::nextafter(0.1, DBL_MAX))) * (r.Top() - r.Bottom()) / nPrintNumCopies;
414 nFontIndex = (i % maFontNames.size());
415 nFontColorIndex=(i % maFontNames.size());
416 }
417
418 rDev.SetTextColor(Color(nCols[nFontColorIndex]));
________________________________________________________________________________________________________
*** CID 1268023: Logically dead code (DEADCODE)
/vcl/source/opengl/OpenGLHelper.cxx: 120 in addPreamble(rtl::OString &, const rtl::OString &)()
114 int nVersionStrEndPos = rShaderSource.indexOf('\n', nVersionStrStartPos);
115
116 // no way this should happen - if this is the case, then it's a syntax error
117 assert(nVersionStrEndPos != -1);
118
119 if (nVersionStrEndPos == -1)
>>> CID 1268023: Logically dead code (DEADCODE)
>>> Execution cannot reach this statement: "nVersionStrEndPos = nVersio...".
120 nVersionStrEndPos = nVersionStrStartPos + 8;
121
122 OString aVersionLine = rShaderSource.copy(0, nVersionStrEndPos - nVersionStrStartPos);
123 OString aShaderBody = rShaderSource.copy(nVersionStrEndPos - nVersionStrStartPos);
124
125 rShaderSource = aVersionLine + "\n" + rPreamble + "\n" + aShaderBody;
________________________________________________________________________________________________________
*** CID 1268024: Uncaught exception (UNCAUGHT_EXCEPT)
/basctl/source/dlged/dlgedlist.cxx: 42 in basctl::DlgEdPropListenerImpl::propertyChange(const com::sun::star::beans::PropertyChangeEvent &)()
36 // XEventListener
37 void SAL_CALL DlgEdPropListenerImpl::disposing( const ::com::sun::star::lang::EventObject& ) throw( ::com::sun::star::uno::RuntimeException, std::exception)
38 {
39 }
40
41 // XPropertyChangeListener
>>> CID 1268024: Uncaught exception (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::container::NoSuchElementException" is thrown but the throw list "throw(com::sun::star::uno::RuntimeException, std::exception)" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
42 void SAL_CALL DlgEdPropListenerImpl::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException, std::exception)
43 {
44 rDlgEdObj._propertyChange( evt );
45 }
46
47 // DlgEdEvtContListenerImpl
________________________________________________________________________________________________________
*** CID 1268025: Uninitialized scalar field (UNINIT_CTOR)
/vcl/inc/sallayout.hxx: 304 in GlyphItem::GlyphItem(int, unsigned int, const Point &, long, int)()
298 GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
299 long nFlags, int nOrigWidth )
300 : mnFlags(nFlags), mnCharPos(nCharPos),
301 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
302 mnXOffset(0),
303 maGlyphId(aGlyphId), maLinearPos(rLinearPos)
>>> CID 1268025: Uninitialized scalar field (UNINIT_CTOR)
>>> Non-static class member "mnYOffset" is not initialized in this constructor nor in any functions that it calls.
304 {}
305
306 GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
307 long nFlags, int nOrigWidth, int nXOffset, int nOrigHeight, int nYOffset )
308 : mnFlags(nFlags), mnCharPos(nCharPos),
309 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
________________________________________________________________________________________________________
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