[splint-discuss] How to check Uninitialized variable

Vijayendra Suman vijayendra.suman at gmail.com
Tue May 12 02:36:08 PDT 2009


Hi All,

I have a piece of code which has a problem of uninitialized variable, I have
used the -Wall which also adds  -Wuninitialized,


void Call(int *a)
{
if (a==NULL) return;
if (*a == 1 )
StatusUpdate = MyOne();
else
StatusUpdate = MyTwo();
}

int main(int argc, char * argv[])
{
 int call; /* call is not initialized */
 Call(&call);
 return 0;
}

Do we have a mechanism to check such kind of errors with splint tool.

-- 
https://mail.google.com/mail/?ui=2&view=bsp&ver=1qygpcgurkovy
Regards
Vijayendra Suman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090512/0a98b6b1/attachment-0001.html 


More information about the splint-discuss mailing list