New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Tue Sep 8 09:13:14 UTC 2020
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
18 new defect(s) introduced to LibreOffice found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 18 of 18 defect(s)
** CID 1466662: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const rtl::OUString &, std::vector<rtl::OUString, std::allocator<rtl::OUString>> &)()
________________________________________________________________________________________________________
*** CID 1466662: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const rtl::OUString &, std::vector<rtl::OUString, std::allocator<rtl::OUString>> &)()
57 SfxListener aListener;
58 GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aListener );
59
60 if( pTheme )
61 {
62 for( sal_uInt32 i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ )
>>> CID 1466662: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "pTheme->GetObjectURL(i)" leaks it.
63 rObjList.push_back( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
64
65 pGal->ReleaseTheme( pTheme, aListener );
66 }
67 }
68
** CID 1466661: Parse warnings (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
________________________________________________________________________________________________________
*** CID 1466661: Parse warnings (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
33 namespace dbaui
34 {
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::ucb;
37 using namespace ::svt;
38
>>> CID 1466661: Parse warnings (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being initialized (not for a component of that type)
39 const OStringLiteral aGroupIdent("dBase III");
40
41
42 ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const OUString& aDataSrcName)
43 : GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog")
44 , m_aDSN(aDataSrcName)
** CID 1466660: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in std::find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
________________________________________________________________________________________________________
*** CID 1466660: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in std::find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
3916 * @return The first iterator @c i in the range @p [__first,__last)
3917 * such that @p __pred(*i) is true, or @p __last if no such iterator exists.
3918 */
3919 template<typename _InputIterator, typename _Predicate>
3920 inline _InputIterator
3921 find_if(_InputIterator __first, _InputIterator __last,
>>> CID 1466660: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, bool, bool)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
3922 _Predicate __pred)
3923 {
3924 // concept requirements
3925 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
3926 __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
3927 typename iterator_traits<_InputIterator>::value_type>)
** CID 1466659: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in std::find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
________________________________________________________________________________________________________
*** CID 1466659: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in std::find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
3916 * @return The first iterator @c i in the range @p [__first,__last)
3917 * such that @p __pred(*i) is true, or @p __last if no such iterator exists.
3918 */
3919 template<typename _InputIterator, typename _Predicate>
3920 inline _InputIterator
3921 find_if(_InputIterator __first, _InputIterator __last,
>>> CID 1466659: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart> >, std::allocator<std::pair<std::pair<int, SchXMLLabeledSequencePart> const, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > > > &)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
3922 _Predicate __pred)
3923 {
3924 // concept requirements
3925 __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
3926 __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
3927 typename iterator_traits<_InputIterator>::value_type>)
** CID 1466658: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 276 in __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>::_Iter_pred(SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)])()
________________________________________________________________________________________________________
*** CID 1466658: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 276 in __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>::_Iter_pred(SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)])()
270 template<typename _Predicate>
271 struct _Iter_pred
272 {
273 _Predicate _M_pred;
274
275 explicit
>>> CID 1466658: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart> >, std::allocator<std::pair<std::pair<int, SchXMLLabeledSequencePart> const, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > > > &)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
276 _Iter_pred(_Predicate __pred)
277 : _M_pred(_GLIBCXX_MOVE(__pred))
278 { }
279
280 template<typename _Iterator>
281 bool
** CID 1466657: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 288 in __gnu_cxx::__ops::__pred_iter<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1)()
________________________________________________________________________________________________________
*** CID 1466657: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 288 in __gnu_cxx::__ops::__pred_iter<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1)()
282 operator()(_Iterator __it)
283 { return bool(_M_pred(*__it)); }
284 };
285
286 template<typename _Predicate>
287 inline _Iter_pred<_Predicate>
>>> CID 1466657: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart> >, std::allocator<std::pair<std::pair<int, SchXMLLabeledSequencePart> const, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > > > &)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
288 __pred_iter(_Predicate __pred)
289 { return _Iter_pred<_Predicate>(_GLIBCXX_MOVE(__pred)); }
290
291 template<typename _Compare, typename _Value>
292 struct _Iter_comp_to_val
293 {
** CID 1466656: Control flow issues (DEADCODE)
/include/rtl/stringutils.hxx: 261 in rtl::libreoffice_internal::ConstCharArrayDetector<const char16_t [1], void>::isValid(const char16_t (&)[1])()
________________________________________________________________________________________________________
*** CID 1466656: Control flow issues (DEADCODE)
/include/rtl/stringutils.hxx: 261 in rtl::libreoffice_internal::ConstCharArrayDetector<const char16_t [1], void>::isValid(const char16_t (&)[1])()
255 struct ConstCharArrayDetector<sal_Unicode const [N], T> {
256 using TypeUtf16 = T;
257 static constexpr bool const ok = true;
258 static constexpr std::size_t const length = N - 1;
259 static constexpr bool isValid(sal_Unicode const (& literal)[N]) {
260 for (std::size_t i = 0; i != N - 1; ++i) {
>>> CID 1466656: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "if ((*literal)[i] == 0) {
...".
261 if (literal[i] == '\0') {
262 return false;
263 }
264 }
265 return literal[N - 1] == '\0';
266 }
** CID 1466655: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 773 in GalleryBrowser2::Travel(GalleryBrowserTravel)()
________________________________________________________________________________________________________
*** CID 1466655: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 773 in GalleryBrowser2::Travel(GalleryBrowserTravel)()
767 const sal_uInt32 nPos = nNewItemId - 1;
768
769 mpCurTheme->GetGraphic( nPos, aGraphic );
770 mxPreview->SetGraphic( aGraphic );
771
772 if( SgaObjKind::Sound == mpCurTheme->GetObjectKind( nPos ) )
>>> CID 1466655: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "this->mpCurTheme->GetObjectURL(nPos)" leaks it.
773 GalleryPreview::PreviewMedia( mpCurTheme->GetObjectURL( nPos ) );
774
775 mxPreview->Invalidate();
776 }
777
778 void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId )
** CID 1466654: Uninitialized members (UNINIT_CTOR)
/xmloff/source/chart/transporttypes.hxx: 206 in DataRowPointStyle::DataRowPointStyle(DataRowPointStyle::StyleType, const rtl::OUString &, int)()
________________________________________________________________________________________________________
*** CID 1466654: Uninitialized members (UNINIT_CTOR)
/xmloff/source/chart/transporttypes.hxx: 206 in DataRowPointStyle::DataRowPointStyle(DataRowPointStyle::StyleType, const rtl::OUString &, int)()
200 DataRowPointStyle(StyleType eType, const OUString& sStyleName, sal_Int32 nAttachedAxis = 0)
201 : meType(eType)
202 , msStyleName(sStyleName)
203 , mnAttachedAxis(nAttachedAxis)
204 , mbSymbolSizeForSeriesIsMissingInFile(false)
205 {
>>> CID 1466654: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_nPointRepeat" is not initialized in this constructor nor in any functions that it calls.
206 }
207 };
208
209 typedef ::std::multimap< OUString, css::uno::Reference<
210 css::chart2::data::XDataSequence > > tSchXMLRangeSequenceMap;
211
212 #endif // INCLUDED_XMLOFF_SOURCE_CHART_TRANSPORTTYPES_HXX
213
** CID 1466653: Parse warnings (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()
________________________________________________________________________________________________________
*** CID 1466653: Parse warnings (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()
261 return bHasBracket;
262 }
263
264 } // namespace
265
266 const OStringLiteral gaOpeningCData( "<![CDATA[" );
>>> CID 1466653: Parse warnings (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being initialized (not for a component of that type)
267 const OStringLiteral gaClosingCData( "]]>" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
272 maOpeningBracket( 1 ),
** CID 1466652: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 697 in GalleryBrowser2::SetMode(GalleryBrowserMode)()
________________________________________________________________________________________________________
*** CID 1466652: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 697 in GalleryBrowser2::SetMode(GalleryBrowserMode)()
691 mpCurTheme->GetGraphic( nPos, aGraphic );
692
693 mxPreview->SetGraphic( aGraphic );
694 mxPreview->Show();
695
696 if( mpCurTheme && mpCurTheme->GetObjectKind( nPos ) == SgaObjKind::Sound )
>>> CID 1466652: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "this->mpCurTheme->GetObjectURL(nPos)" leaks it.
697 GalleryPreview::PreviewMedia( mpCurTheme->GetObjectURL( nPos ) );
698
699 mxIconButton->set_sensitive(false);
700 mxListButton->set_sensitive(false);
701 }
702 }
** CID 1466651: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 276 in __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>::_Iter_pred(SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)])()
________________________________________________________________________________________________________
*** CID 1466651: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 276 in __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>::_Iter_pred(SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)])()
270 template<typename _Predicate>
271 struct _Iter_pred
272 {
273 _Predicate _M_pred;
274
275 explicit
>>> CID 1466651: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, bool, bool)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
276 _Iter_pred(_Predicate __pred)
277 : _M_pred(_GLIBCXX_MOVE(__pred))
278 { }
279
280 template<typename _Iterator>
281 bool
** CID 1466650: Parse warnings (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()
________________________________________________________________________________________________________
*** CID 1466650: Parse warnings (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()
260
261 return bHasBracket;
262 }
263
264 } // namespace
265
>>> CID 1466650: Parse warnings (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being initialized (not for a component of that type)
266 const OStringLiteral gaOpeningCData( "<![CDATA[" );
267 const OStringLiteral gaClosingCData( "]]>" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
** CID 1466649: Parse warnings (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()
________________________________________________________________________________________________________
*** CID 1466649: Parse warnings (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()
19
20 #include <astdeclaration.hxx>
21 #include <astscope.hxx>
22 #include <rtl/strbuf.hxx>
23 #include <osl/diagnose.h>
24
>>> CID 1466649: Parse warnings (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being initialized (not for a component of that type)
25 const OStringLiteral sGlobal("::");
26
27 static OString convertName(const OString& name)
28 {
29 OStringBuffer nameBuffer(name.getLength()+1);
30 sal_Int32 nIndex = 0;
** CID 1466648: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 288 in __gnu_cxx::__ops::__pred_iter<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1)()
________________________________________________________________________________________________________
*** CID 1466648: Performance inefficiencies (PASS_BY_VALUE)
/usr/include/c++/8/bits/predefined_ops.h: 288 in __gnu_cxx::__ops::__pred_iter<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1)()
282 operator()(_Iterator __it)
283 { return bool(_M_pred(*__it)); }
284 };
285
286 template<typename _Predicate>
287 inline _Iter_pred<_Predicate>
>>> CID 1466648: Performance inefficiencies (PASS_BY_VALUE)
>>> Passing parameter __pred of type "SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, bool, bool)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) by value.
288 __pred_iter(_Predicate __pred)
289 { return _Iter_pred<_Predicate>(_GLIBCXX_MOVE(__pred)); }
290
291 template<typename _Compare, typename _Value>
292 struct _Iter_comp_to_val
293 {
** CID 1466647: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 1202 in GalleryBrowser2::GetURL() const()
________________________________________________________________________________________________________
*** CID 1466647: Resource leaks (RESOURCE_LEAK)
/svx/source/gallery2/galbrws2.cxx: 1202 in GalleryBrowser2::GetURL() const()
1196
1197 INetURLObject GalleryBrowser2::GetURL() const
1198 {
1199 INetURLObject aURL;
1200
1201 if( mpCurTheme && mnCurActionPos != 0xffffffff )
>>> CID 1466647: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "this->mpCurTheme->GetObjectURL(this->mnCurActionPos)" leaks it.
1202 aURL = mpCurTheme->GetObjectURL( mnCurActionPos );
1203
1204 return aURL;
1205 }
1206
1207 OUString GalleryBrowser2::GetFilterName() const
** CID 1291332: (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 159 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2)()
/usr/include/c++/8/bits/stl_algo.h: 159 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2)()
________________________________________________________________________________________________________
*** CID 1291332: (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 159 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2)()
153 return __last;
154 }
155 }
156
157 template<typename _Iterator, typename _Predicate>
158 inline _Iterator
>>> CID 1291332: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "__gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart> >, std::allocator<std::pair<std::pair<int, SchXMLLabeledSequencePart> const, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > > > &)::[lambda(DataRowPointStyle const &) (instance 1)]>" (size 136 bytes) by value.
159 __find_if(_Iterator __first, _Iterator __last, _Predicate __pred)
160 {
161 return __find_if(__first, __last, __pred,
162 std::__iterator_category(__first));
163 }
164
/usr/include/c++/8/bits/stl_algo.h: 159 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2)()
153 return __last;
154 }
155 }
156
157 template<typename _Iterator, typename _Predicate>
158 inline _Iterator
>>> CID 1291332: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "__gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, bool, bool)::[lambda(DataRowPointStyle const &) (instance 1)]>" (size 136 bytes) by value.
159 __find_if(_Iterator __first, _Iterator __last, _Predicate __pred)
160 {
161 return __find_if(__first, __last, __pred,
162 std::__iterator_category(__first));
163 }
164
** CID 1186122: (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 113 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2, std::random_access_iterator_tag)()
/usr/include/c++/8/bits/stl_algo.h: 113 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2, std::random_access_iterator_tag)()
________________________________________________________________________________________________________
*** CID 1186122: (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 113 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2, std::random_access_iterator_tag)()
107 }
108
109 /// This is an overload used by find algos for the RAI case.
110 template<typename _RandomAccessIterator, typename _Predicate>
111 _RandomAccessIterator
112 __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
>>> CID 1186122: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "__gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, bool, bool)::[lambda(DataRowPointStyle const &) (instance 1)]>" (size 136 bytes) by value.
113 _Predicate __pred, random_access_iterator_tag)
114 {
115 typename iterator_traits<_RandomAccessIterator>::difference_type
116 __trip_count = (__last - __first) >> 2;
117
118 for (; __trip_count > 0; --__trip_count)
/usr/include/c++/8/bits/stl_algo.h: 113 in std::__find_if<__gnu_cxx::__normal_iterator<DataRowPointStyle *, std::vector<DataRowPointStyle, std::allocator<DataRowPointStyle>>>, __gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart>>, std::allocator<std::pair<const std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>>>> &)::[lambda(const DataRowPointStyle &) (instance 1)]>>(T1, T1, T2, std::random_access_iterator_tag)()
107 }
108
109 /// This is an overload used by find algos for the RAI case.
110 template<typename _RandomAccessIterator, typename _Predicate>
111 _RandomAccessIterator
112 __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
>>> CID 1186122: (PASS_BY_VALUE)
>>> Passing parameter __pred of type "__gnu_cxx::__ops::_Iter_pred<SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, SchXMLImportHelper const &, SvXMLImport const &, bool, std::multimap<std::pair<int, SchXMLLabeledSequencePart>, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>, std::less<std::pair<int, SchXMLLabeledSequencePart> >, std::allocator<std::pair<std::pair<int, SchXMLLabeledSequencePart> const, com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence> > > > &)::[lambda(DataRowPointStyle const &) (instance 1)]>" (size 136 bytes) by value.
113 _Predicate __pred, random_access_iterator_tag)
114 {
115 typename iterator_traits<_RandomAccessIterator>::difference_type
116 __trip_count = (__last - __first) >> 2;
117
118 for (; __trip_count > 0; --__trip_count)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D7RiT_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJirD3o3ynI7-2FfBkKQA8SbHiVa4DdvlTpRIvkHx-2FcvV0Nh3rIsnyWa73hJMhX2OpdcUS3c4WC5cvQ-2F8DhsLrll4OkPnEm6F7qVwW3Q1un-2FxooZLMpl0cstkQSFZ-2BnoLl2Kt3eG-2FGJuvKTJR8LUC21t-2Br8zHfs7CNRLDlcssyJSQLFX4zYy3aEZulKCU8yo2HLqf
More information about the LibreOffice
mailing list