Wireshark-commits: [Wireshark-commits] rev 50005: /trunk/ /trunk/: text2pcap.c

Date: Tue, 18 Jun 2013 12:22:44 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50005

User: jmayer
Date: 2013/06/18 05:22 AM

Log:
 Fix compile error:
 
 [ 79%] Building C object CMakeFiles/text2pcap.dir/text2pcap.c.o
 In file included from /usr/include/glib-2.0/glib/galloca.h:34:0,
                  from /usr/include/glib-2.0/glib.h:32,
                  from /home/jmayer/work/wireshark/svn/trunk/wsutil/file_util.h:34,
                  from /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:116:
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c: In function ‘write_current_packet’:
 /usr/include/glib-2.0/glib/gtypes.h:186:22: error: declaration of ‘__v’ shadows a previous local [-Werror=shadow]
   ({ register guint16 __v, __x = ((guint16) (val)); \
                       ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
  #define g_htons(val) (GUINT16_TO_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                    ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:327:31: note: in expansion of macro ‘GUINT16_TO_BE’
  #define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
                                ^
 /usr/include/glib-2.0/glib/gtypes.h:357:23: note: in expansion of macro ‘GUINT16_FROM_BE’
  #define g_ntohs(val) (GUINT16_FROM_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:52: note: in expansion of macro ‘g_ntohs’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                                     ^
 /usr/include/glib-2.0/glib/gtypes.h:186:22: error: shadowed declaration is here [-Werror=shadow]
   ({ register guint16 __v, __x = ((guint16) (val)); \
                       ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
  #define g_htons(val) (GUINT16_TO_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                    ^
 /usr/include/glib-2.0/glib/gtypes.h:186:27: error: declaration of ‘__x’ shadows a previous local [-Werror=shadow]
   ({ register guint16 __v, __x = ((guint16) (val)); \
                            ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
  #define g_htons(val) (GUINT16_TO_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                    ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:327:31: note: in expansion of macro ‘GUINT16_TO_BE’
  #define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
                                ^
 /usr/include/glib-2.0/glib/gtypes.h:357:23: note: in expansion of macro ‘GUINT16_FROM_BE’
  #define g_ntohs(val) (GUINT16_FROM_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:52: note: in expansion of macro ‘g_ntohs’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                                     ^
 /usr/include/glib-2.0/glib/gtypes.h:186:27: error: shadowed declaration is here [-Werror=shadow]
   ({ register guint16 __v, __x = ((guint16) (val)); \
                            ^
 /usr/include/glib-2.0/glib/gtypes.h:237:38: note: in expansion of macro ‘GUINT16_SWAP_LE_BE_IA32’
  #    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
                                       ^
 /usr/lib/glib-2.0/include/glibconfig.h:192:29: note: in expansion of macro ‘GUINT16_SWAP_LE_BE’
  #define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
                              ^
 /usr/include/glib-2.0/glib/gtypes.h:359:23: note: in expansion of macro ‘GUINT16_TO_BE’
  #define g_htons(val) (GUINT16_TO_BE (val))
                        ^
 /home/jmayer/work/wireshark/svn/trunk/text2pcap.c:705:35: note: in expansion of macro ‘g_htons’
              pseudoh.length      = g_htons(length - g_ntohs(HDR_IPv6.ip6_ctlun.ip6_un1.ip6_un1_plen) + sizeof(HDR_UDP));
                                    ^
 cc1: all warnings being treated as errors
 make[2]: *** [CMakeFiles/text2pcap.dir/text2pcap.c.o] Error 1
 
 
 Feel free to choose a less offensive variable name

Directory: /trunk/
  Changes    Path           Action
  +3 -1      text2pcap.c    Modified