Wireshark mailing list archives

Re: [Wireshark-commits] rev 36772: /trunk/plugins/profinet/ /trunk/plugins/profinet/: packet-dcerpc-pn-io.c


From: Jakub Zawadzki <darkjames () darkjames ath cx>
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
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: