[splint-discuss] Help me with @refcounted@

AlannY m at alanny.ru
Sat Jan 16 08:31:47 PST 2010


On Sat, Jan 16, 2010 at 10:58:10AM -0500, Jeff Johnson wrote:
> 
> I forgot to mention /*@-branchstate@/, which I routinely disable
> globally these days. The types of issues that /-branchstate reports,
> while technically useful, are too hard to get right everywhere when
> retrofitting splint annotations on "real world" code.
> 
> I turn on branchstate checking occaisonally to see the technical issues,
> but I seldom have the time and opportunity to actually "fix" the issue
> that different code branches have inconsistent results when the code paths
> rejoin.
> 
> JMHO using splint, YMMV, likely will.
> 
> 73 de Jeff

Last question for today. I'm getting the following (one) warning:

    test.c:48:13: Reference counted storage passed as only param: free (t)
  Reference counted storage is transferred in a way that may not be consistent
  with the reference count. (Use -refcounttrans to inhibit warning)

Is it normal to use -refcounttrans here, or there are better way with annotations?
t is for reference counter type, but function free takes @only@ variable? Just skip?

-- 
   )\._.,--....,'``.
  /,   _.. \   _\  (`._ ,.
 `._.-(,_..'--(,_..'`-.;.' 


More information about the splint-discuss mailing list