[splint-discuss] Tell me more about -globstate

AlannY m at alanny.ru
Fri Jan 15 06:23:54 PST 2010


Hi there. I've confronted with error message, which 2nd day cannot understand.

On, here is it:

    test.c:6:15: Function returns with global <variable> referencing released storage
  A global variable does not satisfy its annotations when control is
  transferred. (Use -globstate to inhibit warning)
   test.c:6:10: Storage <variable> released

And example:

    /*@null@*/ static void *root = NULL;

    /*@null@*/ void*
    my_function (void)
    {
6:    return root;
    }

What does it meat "A global variable does not satisfy its annotations". What annotation there must be?
-- 
   )\._.,--....,'``.
  /,   _.. \   _\  (`._ ,.
 `._.-(,_..'--(,_..'`-.;.' 


More information about the splint-discuss mailing list