[Interest] Klocwork error in Qt5 concurrentwrapper

Ramakanth Kesireddy rama.kesi at gmail.com
Sat May 30 20:03:57 CEST 2020


Hi ,

Below is the Klocwork error thrown while using Qt5 with the application
code:

Void function returns value VOIDRET pointing to the below code in
qtbase/src/concurrent/qtconcurrentfunctionwrappers.h.

template <class C, class U>
    inline void operator()(C &c, U &&u) const
    {
        return c.push_back(u);
    }

Could you please let me know if the below singleton class code would
trigger above error and be ignored or not?

QSharedPointer<MyClass> MyClass::getInstance( void )
{

if(m_Sharedptr.isNull() )
{
m_Sharedptr = ( QSharedPointer<MyClass> ) new MyClass();
....
}
Q_CHECK_PTR( m_Sharedptr.data() );

return m_Sharedptr;
}

Best Regards,
Ramakanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200530/f15a57a0/attachment.html>


More information about the Interest mailing list