Re: [Wireshark-dev] [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_sta

2011-06-09 Thread Stephen Fisher
On Wed, Jun 08, 2011 at 04:38:16PM -0400, Bill Meier wrote: 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. That is important for helping fix problems from different platforms. (Obviously further

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Stig Bjørlykke
On Wed, Jun 8, 2011 at 12:52 AM, wme...@wireshark.org wrote: Log:  Fix gcc 4.6 set but not used [-Wunused-but-set-variable] warnings; prefs_dlg.c: In function ‘pref_check’: prefs_dlg.c:936:12: error: ignoring return value of ‘strtoul’, declared with attribute warn_unused_result -- Stig

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Guy Harris
On Jun 8, 2011, at 1:09 AM, Stig Bjørlykke wrote: On Wed, Jun 8, 2011 at 12:52 AM, wme...@wireshark.org wrote: Log: Fix gcc 4.6 set but not used [-Wunused-but-set-variable] warnings; prefs_dlg.c: In function ‘pref_check’: prefs_dlg.c:936:12: error: ignoring return value of ‘strtoul’,

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Guy Harris
On Jun 8, 2011, at 1:23 AM, Guy Harris wrote: Squelched with a (void) cast (it's only using strtoul() for the side-effects of setting the pointer to the end of the number argument and errno, in order to see whether the text value of the preference is a valid number or not).

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Stig Bjørlykke
On Wed, Jun 8, 2011 at 10:23 AM, Guy Harris g...@alum.mit.edu wrote: Squelched with a (void) cast (it's only using strtoul() for the side-effects of setting the pointer to the end of the number argument and errno, in order to see whether the text value of the preference is a valid number or

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Дмитрий Дьяченко
[FYI] http://gcc.gnu.org/ml/gcc/2010-05/msg00657.html [snip] As the compiler documentation states, warn_unused_result was intended for cases where failing to check the return value is always a security risk or a bug. The documentation cites the example of realloc. That is a case where casting

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Bill Meier
On 6/8/2011 10:46 AM, Дмитрий Дьяченко wrote: [FYI] http://gcc.gnu.org/ml/gcc/2010-05/msg00657.html [snip] As the compiler documentation states, warn_unused_result was intended for cases where failing to check the return value is always a security risk or a bug. The documentation cites the

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Guy Harris
On Jun 8, 2011, at 7:46 AM, Дмитрий Дьяченко wrote: [FYI] http://gcc.gnu.org/ml/gcc/2010-05/msg00657.html [snip] As the compiler documentation states, warn_unused_result was intended for cases where failing to check the return value is always a security risk or a bug. The documentation

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Дмитрий Дьяченко
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__ \

Re: [Wireshark-dev] [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_sta

2011-06-08 Thread Bill Meier
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) #