Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On 04/04/2015 07:18 PM, scan-admin@coverity.com wrote:
** CID 1292911:    (PASS_BY_VALUE)
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxLRSpaceItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 4)], 
void>(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxULSpaceItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 5)], 
void>(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxFmtBreakItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 2)], 
void>(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxBrushItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 1)], 
void>(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxFmtKeepItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 3)], 
void>(T1)()


________________________________________________________________________________________________________
*** CID 1292911:    (PASS_BY_VALUE)
/usr/include/c++/4.9.2/functional: 2419 in std::function<SvxLRSpaceItem 
()>::function<SwTableProperties_Impl::ApplyTblAttr(const SwTable &, SwDoc &)::[lambda() (instance 4)], 
void>(T1)()
2413            }
2414         }
2415
2416       template<typename _Res, typename... _ArgTypes>
2417         template<typename _Functor, typename>
2418           function<_Res(_ArgTypes...)>::
     CID 1292911:    (PASS_BY_VALUE)
     Passing parameter __f of type "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc 
&)::[lambda() (instance 4)]" (size 168 bytes) by value.
2419           function(_Functor __f)
2420           : _Function_base()
2421           {
2422            typedef _Function_handler<_Signature_type, _Functor> _My_handler;
2423
2424            if (_My_handler::_M_not_empty_function(__f))

This is kind of a gotcha. Note how entities of reference-to-object type are captured by copy. Fixed with <http://cgit.freedesktop.org/libreoffice/core/commit/?id=82b71d4764c12eb173f6d98b94d6bbbc5d296d7e> "Coverity#1292911: Capture by reference."


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.