> Note that in the "do_async" case above, read_results is passed
> from the stack of the caller. lclint considers this correct, because
> it does not understand that the action of read_data() may cause
> another thread to write into read_results after read_data() returns.

So, basically LClint needs to assume that pointers to stack based storage
cannot be kept.  I believe that there is an annotation for this (that is
applied to a variable/structure field to say that it cannot be kept), so it
should be fairly easy to make this the default for pointers to automatic
variables.

You will, of course, need to annotate the function paramter to say that it
is kept.

-- 
 "Those who cast the votes decide nothing. Those who count the votes
  decide everything." - Joseph Stalin

                                   http://www.georgebushisapunk.com/

Reply via email to