Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 36772: /trunk/plugins/profinet/ /tru

From: Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx>
Date: Fri, 22 Apr 2011 17:40:52 +0200
On Fri, Apr 22, 2011 at 11:18:22AM -0400, Jeff Morriss wrote:
> Stephen Fisher wrote:
> > On Fri, Apr 22, 2011 at 03:09:01PM +0200, Alexis La Goutte wrote:
> > 
> >> Why not add a check (in checkAPIs.pl) if proto_item_add_subtree always 
> >> return a value ?
> > 
> > Good idea.  Another way to do it is a gcc attribute called 
> > warn_unused_result: 
> > 
> >   http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
> 
> That was my thought this morning as well; I added that check (after 
> fixing all the resulting warnings) in rev 36812.

... and Glib since 2.10 have got G_GNUC_WARN_UNUSED_RESULT [1] 

>From r36812:
>> /* XXX where should this go? */

I thought about g_gnuc_malloc.h but name is little confusing.
What about renaming g_gnuc_malloc.h to g_gnuc.h?

[1] http://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#G-GNUC-WARN-UNUSED-RESULT:CAPS