The cppCheck version 2.6 and 2.7 has regression that it reports a false positive [missingReturn] (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement from a CTOR.
TABuffer.cpp(79) : (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement [cppCheck]
TABuffer::TABuffer()
, m_count(0)
, m_f(false)
{
memset(m_a, 0, sizeof(m_a));
memset(m_b, 0, sizeof(m_b));
memset(m_c, 0, sizeof(m_c)); ------> Reports this false-positive (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement [cppCheck]
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The cppCheck version 2.6 and 2.7 has regression that it reports a false positive [missingReturn] (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement from a CTOR.
TABuffer.cpp(79) : (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement [cppCheck]
TABuffer::TABuffer()
, m_count(0)
, m_f(false)
{
memset(m_a, 0, sizeof(m_a));
memset(m_b, 0, sizeof(m_b));
memset(m_c, 0, sizeof(m_c)); ------> Reports this false-positive (error) : [missingReturn] Found a exit path from function with non-void return type that has missing return statement [cppCheck]
}
I can't reproduce this with head. Could you post a more complete example?