Wireshark mailing list archives
Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c
From: Bill Meier <wmeier () newsguy com>
Date: Wed, 08 Jun 2011 16:38:16 -0400
On 6/8/2011 3:34 PM, Дмитрий Дьяченко wrote:
Look as "# if __USE_FORTIFY_LEVEL> 0" take place For example, Fedora 15 /usr/include/sys/cdefs.h contains /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #if __GNUC_PREREQ (3,4) # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) # if __USE_FORTIFY_LEVEL> 0 # define __wur __attribute_warn_unused_result__ # endif #else # define __attribute_warn_unused_result__ /* empty */ #endif #ifndef __wur # define __wur /* Ignore */ #endif As i hear somewhere, Debian-based distros often set __USE_FORTIFY_LEVEL higher then others... May be this is the root of the problem and possible way to resolve it?
It appears that Ubuntu sets -D_FORTIFY_SOURCE=2 [1] [1] https://wiki.ubuntu.com/CompilerFlagsI sort of like (I think) the idea of having this level of checking altho that then means that things like write and strtol will warn if the return value is not used.
Obviously there's been lots of discussion pro & con about all this (starting at least as early as 2005) (following down the trail from your link).
I haven't yet searched alll the Wireshark source, but I think currently that prefs_dlg.c may be the only place where this is an issue (now that iax2... has been fixed by Anders). As Guy noted, presumably we can do the checking in prefs-dlg.c in a different way.
I've not yet understood how/where Ubuntu actually sets FORTIFY_SOURCE.Possibly we could/should set this in general when using gcc so we get the same warnings when using GCC no matter what the platform.
(Obviously further research/discussion is required;For example: what other GCC related default config might be different depending upon the distro ?).
Bill ___________________________________________________________________________ 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:
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Stig Bjørlykke (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Guy Harris (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Guy Harris (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Stig Bjørlykke (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Дмитрий Дьяченко (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Bill Meier (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Guy Harris (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Дмитрий Дьяченко (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Bill Meier (Jun 08)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Stephen Fisher (Jun 09)
- Re: [Wireshark-commits] rev 37601: /trunk/gtk/ /trunk/gtk/: dcerpc_stat.c graph_analysis.c prefs_dlg.c rtp_player.c sctp_assoc_analyse.c sctp_byte_graph_dlg.c sctp_graph_dlg.c sctp_stat.c Guy Harris (Jun 08)