New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sat Dec 31 03:19:59 UTC 2016


Hi,

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

5 new defect(s) introduced to LibreOffice found with Coverity Scan.
12 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 5 of 5 defect(s)


** CID 1398233:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/bitmapex.cxx: 93 in BitmapEx::BitmapEx(const rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1398233:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/bitmapex.cxx: 93 in BitmapEx::BitmapEx(const rtl::OUString &)()
87         CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
88     }
89     
90     BitmapEx::BitmapEx( const OUString& rIconName )
91     {
92         loadFromIconTheme( rIconName );
>>>     CID 1398233:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "bAlpha" is not initialized in this constructor nor in any functions that it calls.
93     }
94     
95     BitmapEx::BitmapEx( const ResId& rResId ) :
96             eTransparent( TransparentType::NONE ),
97             bAlpha      ( false )
98     {

** CID 1398232:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/window.cxx: 825 in ImplFrameData::ImplFrameData(vcl::Window *)()


________________________________________________________________________________________________________
*** CID 1398232:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/window.cxx: 825 in ImplFrameData::ImplFrameData(vcl::Window *)()
819         maPaintIdle.SetDebugName( "vcl::Window maPaintIdle" );
820         maResizeIdle.SetPriority( SchedulerPriority::RESIZE );
821         maResizeIdle.SetIdleHdl( LINK( pWindow, vcl::Window, ImplHandleResizeTimerHdl ) );
822         maResizeIdle.SetDebugName( "vcl::Window maResizeIdle" );
823         mbInternalDragGestureRecognizer = false;
824         mbInBufferedPaint = false;
>>>     CID 1398232:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member field "maMapUnitRes.mfScaleY" is not initialized in this constructor nor in any functions that it calls.
825     }
826     
827     namespace vcl {
828     
829     bool Window::AcquireGraphics() const
830     {

** CID 1398231:  Uninitialized variables  (UNINIT)
/vcl/workben/vcldemo.cxx: 853 in DemoRenderer::DrawBitmap::SimulateBorderStretch(OutputDevice &, const Rectangle &)()


________________________________________________________________________________________________________
*** CID 1398231:  Uninitialized variables  (UNINIT)
/vcl/workben/vcldemo.cxx: 853 in DemoRenderer::DrawBitmap::SimulateBorderStretch(OutputDevice &, const Rectangle &)()
847             RENDER_DETAILS(bitmap,KEY_B,10)
848     
849             // Simulate Page Borders rendering - which ultimately should
850             // be done with a shader / gradient
851             static void SimulateBorderStretch(OutputDevice &rDev, const Rectangle& r)
852             {
>>>     CID 1398231:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "aPageShadowMask".
853                 BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
854     
855                 BitmapEx aRight(aPageShadowMask);
856                 sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4;
857                 // a width x 1 slice
858                 aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),

** CID 1398230:  Incorrect expression  (IDENTICAL_BRANCHES)
/workdir/CustomTarget/vcl/unx/kde4/tst_exclude_posted_events.moc: 76 in TestExcludePostedEvents::qt_metacall(QMetaObject::Call, int, void **)()


________________________________________________________________________________________________________
*** CID 1398230:  Incorrect expression  (IDENTICAL_BRANCHES)
/workdir/CustomTarget/vcl/unx/kde4/tst_exclude_posted_events.moc: 76 in TestExcludePostedEvents::qt_metacall(QMetaObject::Call, int, void **)()
70         return QObject::qt_metacast(_clname);
71     }
72     
73     int TestExcludePostedEvents::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
74     {
75         _id = QObject::qt_metacall(_c, _id, _a);
>>>     CID 1398230:  Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed when the condition "_id < 0" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
76         if (_id < 0)
77             return _id;
78         return _id;
79     }

** CID 1398229:  Control flow issues  (DEADCODE)
/svtools/source/misc/imagemgr.cxx: 547 in GetImageFromList_Impl(unsigned short, bool)()


________________________________________________________________________________________________________
*** CID 1398229:  Control flow issues  (DEADCODE)
/svtools/source/misc/imagemgr.cxx: 547 in GetImageFromList_Impl(unsigned short, bool)()
541                 return Image(BitmapEx(SvtResId(bBig ? BMP_CDROMDEV_LC : BMP_CDROMDEV_SC)));
542             case IMG_NETWORKDEV:
543                 return Image(BitmapEx(SvtResId(bBig ? BMP_NETWORKDEV_LC : BMP_NETWORKDEV_SC)));
544             case IMG_TABLE:
545                 return Image(BitmapEx(SvtResId(bBig ? BMP_TABLE_LC : BMP_TABLE_SC)));
546             case IMG_FOLDER:
>>>     CID 1398229:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "16430" inside this statement: "<temporary>.SvtResId((bBig ...".
547                 return Image(BitmapEx(SvtResId(bBig ? BMP_FOLDER_LC : BMP_FOLDER_SC)));
548             case IMG_DXF:
549                 return Image(BitmapEx(SvtResId(bBig ? BMP_DXF_LC : BMP_DXF_SC)));
550             case IMG_MET:
551                 return Image(BitmapEx(SvtResId(bBig ? BMP_MET_LC : BMP_MET_SC)));
552             case IMG_PNG:


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyMaNcm4tLPsM43Jy5QwW5mmO09TRv6ET-2Fqo3OI0d7qBWh-2Fxprvh5HhdvGTyKFNIpUPvcHguhgpJ6DLOPzcezfP773pxofu5adnXfOk2NXXHDoOe7rdhvrYwUG3bP5OG2oJ7d5z2Pk9mz05-2FNGuaThSg9EUTA6xHug39kJuixtDKo-3D

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5N5X-2B1MAElavPQhH6nLwozJzqOkt2k8uOkYf2ZoppNa9QVe0T3fEZVQ7Kky1tOkLz_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyMaNcm4tLPsM43Jy5QwW5miA3aR76vMibtuFXMbwF-2FOboGDCJRdM8psODNYS5R0LN-2BhxDVuq7gKIBbgWsuUv8qMVhy867vXh456s4vaU7Q2reH-2FbJHQ5hk848auRmMd82xVilyQ2V72NF0-2BIwy0TxOfnB0vJaPjPMfvumQEv2g2I-3D



More information about the LibreOffice mailing list