[splint-discuss] How to check Uninitialized variable
Jonathan and Caroline Moore
jandcmoore at gmail.com
Tue May 12 03:19:11 PDT 2009
call is not initialized but the address of call is certainly initialized.
Can you post some code that will compile.
Jonathan
2009/5/12 Vijayendra Suman <vijayendra.suman at gmail.com>:
> 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
>
> _______________________________________________
> splint-discuss mailing list
> splint-discuss at mail.cs.virginia.edu
> http://www.cs.virginia.edu/mailman/listinfo/splint-discuss
>
>
--
Jonathan (and Caroline)
Jonathan and Caroline Moore
JandCMoore at gmail.com (Jonathan)
CandJMoore at gmail.com (Caroline)
http://jandcmoore.googlepages.com/
More information about the splint-discuss
mailing list