Is there software smart enough to figure out that you got a pointer from somewhere and the returned pointer could be NULL and no where in the block do you do:
ptr = getSomeDataThatCouldReturnNULLAt(-1);
…
if(ptr)
{
//code
}
or
if(!ptr)
{
return;
}
Is there software that can let you know all the places where this might not be checked?
Thanks
Checking for runtime problems.
the better way to code this would be as follows :
and then in your function where you want to invoke this function :
returnValuecan indicate the error that occured in yourgetSomeDataThatCouldReturnNULLAt