[splint-discuss] Help me with @refcounted@

Jeff Johnson n3npq at mac.com
Sat Jan 16 08:55:36 PST 2010


Apologies for the empty msg.

On Jan 16, 2010, at 11:31 AM, AlannY wrote:

> 
> 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?
> 

I tend to disable in code if/when I never intend to "fix" usually
not using /*@i@*/
	/*@-refcounttrans@*/
	...
	/*@=refcounttrans@*/
and disable in a per-directory .splintrc file with
	-refcounttrans
if the fixing is just waiting for a round 'tuit.

Again, there's lots and lots of ways to use splint, this is
just my fetishisms.

hth

73 de Jeff


More information about the splint-discuss mailing list