Hi,
I think it would be a great feature if cppcheck could report if the return value is being used somewhere, and it may return NULL.
e.g.:
char whatever() { char yeah = malloc(15); return yeah; }
^ this code may return NULL(since malloc may return NULL)
if it is later used without checking against null, it should report that.
Thanks
yes sounds good. somebody should create a ticket for this in our issue tracker (http://trac.cppcheck.net). can you create it?
I joined the IRC chan #cppcheck on freenode, but you(I assume danmar is you) are not in there, so I can't submit my htpasswd for openid.
megamansec:$apr1$6d2dd4Sf$kYGJ7JnFtB4RKYxsMLNs6/ is it, however.
Log in to post a comment.
Hi,
I think it would be a great feature if cppcheck could report if the return value is being used somewhere, and it may return NULL.
e.g.:
char whatever() {
char yeah = malloc(15);
return yeah;
}
^ this code may return NULL(since malloc may return NULL)
if it is later used without checking against null, it should report that.
Thanks
yes sounds good. somebody should create a ticket for this in our issue tracker (http://trac.cppcheck.net). can you create it?
I joined the IRC chan #cppcheck on freenode, but you(I assume danmar is you) are not in there, so I can't submit my htpasswd for openid.
megamansec:$apr1$6d2dd4Sf$kYGJ7JnFtB4RKYxsMLNs6/ is it, however.