Hi,
several new FPs of the following kind appeared in our code due to the most recent commits:
void foo() { std::vector< ptr1 > const potentialRoutes = m_RouteData.getPotentialRoutes( id ); for ( ptr1 const & potentialRoute : potentialRoutes ) {} }
-->
style: Iterating over container 'potentialRoutes' that is always empty. [knownEmptyContainer] for ( ptr1 const & potentialRoute : potentialRoutes ) {} ^
cppcheck can't assume at this point that the container will be empty.
worked with: 3ba69145635a4ff01d4cec65a0293f5b8ccd13b0 occured with: 64a7ba3c4c01cf912dfe8617a94cbe6d00667523
Could you please check?
Thanks, Martin
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/10951
Since you report quite often, maybe @danmar could set you up with a trac account?
I'd use it if I had one, but last time I tried to get one ... mh I don't remember, was some years ago .
if you send me a htpasswd hash I will create an account for you. for information, there are htpasswd hash generators online.
Log in to post a comment.
Hi,
several new FPs of the following kind appeared in our code due to the most recent commits:
-->
cppcheck can't assume at this point that the container will be empty.
worked with: 3ba69145635a4ff01d4cec65a0293f5b8ccd13b0
occured with: 64a7ba3c4c01cf912dfe8617a94cbe6d00667523
Could you please check?
Thanks,
Martin
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/10951
Since you report quite often, maybe @danmar could set you up with a trac account?
I'd use it if I had one, but last time I tried to get one ... mh I don't remember, was some years ago .
if you send me a htpasswd hash I will create an account for you. for information, there are htpasswd hash generators online.