[splint-discuss] [Beginner] Glib data structures not detected as freed

Stephane Bortzmeyer bortz at users.sourceforge.net
Sat Jan 24 05:50:08 PST 2009


On Wed, Jan 14, 2009 at 08:15:14AM -0500,
 Jeff Johnson <n3npq at mac.com> wrote 
 a message of 158 lines which said:

> Try this
> 	/* Repeat the prototype with annotations */
> 	GList *g_list_delete_link(/*@only@*/ GList * list,
>                                   GList * link_)
> 	            /*@modifies list @*/ ;

Hmmm, no, sorry, splint is not happy:

test-glib-splint.c:21:39: Parameter list inconsistently redeclared as only
    storage, previously declared as implicitly temp storage
  A function, variable or constant is redefined with a different type. (Use
  -incondefs to inhibit warning)
   /usr/include/glib-2.0/glib/glist.h:74:60: Declaration of list

The glist.h contains:

GList*   g_list_delete_link             (GList            *list,
					 GList            *link_) G_GNUC_WARN_UNUSED_RESULT;

For a full context, I attached the C source I use. It compiles without
gcc warnings and runs fine but I would like to be able to check it
with splint.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-glib-splint.c
Type: text/x-csrc
Size: 1692 bytes
Desc: not available
Url : http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20090124/748defa2/attachment.bin 


More information about the splint-discuss mailing list