Finny Merrill
Tue, 13 Aug 2002 10:42:53 -0700
On Tue, 13 Aug 2002, Massimiliano Cialdi wrote:
> I need to search for uninitialized variables in a not-instrumented
> source code (w/o annotations). No problem with local (automatic)
> variables but I don't know how to analize global variables.
>
> for example:
>
> ------------------------------
> static int a;
>
> static void s()
> {
> if(a==34) a=33;
> }
>
> int main(void)
> {
> int r;
> if(r==66) r = 65;
> s();
> return 0;
> }
> --------------------
> in this case splint only report "Variable r used before definition", but
> nothing about a.
static variables are initialized to 0 on creation, so it is already
defined.