Changeset 1842

Show
Ignore:
Timestamp:
04/25/07 21:34:11 (21 months ago)
Author:
aturner
Message:

switch to using _U_ instead of attribute((unused)) to be non-gcc
compatible refs #168

Location:
trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1839 r1842  
    221221      fi 
    222222    ]) 
     223 
     224 
     225# If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well, 
     226# so we can use _U_ to flag unused function arguments and not get warnings 
     227# about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused 
     228# function argument will compile with non-GCC compilers. 
     229# 
     230if test "x$GCC" = "xyes" ; then 
     231    CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS" 
     232else 
     233    CFLAGS="-D_U_=\"\" $CFLAGS" 
     234fi 
    223235 
    224236 
     
    10681080LIBOPTS_CHECK 
    10691081 
     1082 
    10701083AC_OUTPUT([Makefile 
    10711084           doxygen.cfg 
  • trunk/src/tcpbridge.c

    r1839 r1842  
    155155 
    156156void  
    157 post_args(__attribute__((unused)) int argc, __attribute__((unused)) char *argv[]) 
     157post_args(_U_ int argc, _U_ char *argv[]) 
    158158{ 
    159159    char ebuf[SENDPACKET_ERRBUF_SIZE]; 
  • trunk/src/tcpedit/plugins/dlt_en10mb/en10mb.c

    r1841 r1842  
    4343#include "../ethernet.h" 
    4444 
    45 static char __attribute__((unused)) dlt_name[] = "en10mb"; 
     45static char _U_ dlt_name[] = "en10mb"; 
    4646static char dlt_prefix[] = "enet"; 
    4747static u_int16_t dlt_value = DLT_EN10MB; 
  • trunk/src/tcpedit/plugins/dlt_hdlc/hdlc.c

    r1841 r1842  
    4242 
    4343static char dlt_name[] = "hdlc"; 
    44 static char __attribute__((unused)) dlt_prefix[] = "hdlc"; 
     44static char _U_ dlt_prefix[] = "hdlc"; 
    4545static u_int16_t dlt_value = DLT_C_HDLC; 
    4646 
     
    222222 */ 
    223223int  
    224 dlt_hdlc_encode(tcpeditdlt_t *ctx, u_char **packet_ex, int pktlen, __attribute__((unused)) tcpr_dir_t dir) 
     224dlt_hdlc_encode(tcpeditdlt_t *ctx, u_char **packet_ex, int pktlen, _U_ tcpr_dir_t dir) 
    225225{ 
    226226    cisco_hdlc_t *hdlc; 
  • trunk/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c

    r1841 r1842  
    4242 
    4343static char dlt_name[] = "linuxsll"; 
    44 static char __attribute__((unused)) dlt_prefix[] = "linuxsll"; 
     44static char _U_ dlt_prefix[] = "linuxsll"; 
    4545static u_int16_t dlt_value = DLT_LINUX_SLL; 
    4646 
     
    211211 */ 
    212212int  
    213 dlt_linuxsll_encode(tcpeditdlt_t *ctx, u_char **packet_ex, int pktlen, __attribute__((unused)) tcpr_dir_t dir) 
     213dlt_linuxsll_encode(tcpeditdlt_t *ctx, u_char **packet_ex, int pktlen, _U_ tcpr_dir_t dir) 
    214214{ 
    215215    u_char *packet; 
  • trunk/src/tcpedit/plugins/dlt_loop/loop.c

    r1841 r1842  
    5050 
    5151static char dlt_name[] = "loop"; 
    52 static char __attribute__((unused)) dlt_prefix[] = "loop"; 
     52static char _U_ dlt_prefix[] = "loop"; 
    5353static u_int16_t dlt_value = DLT_LOOP; 
    5454 
  • trunk/src/tcprewrite.c

    r1836 r1842  
    160160 
    161161void  
    162 post_args(__attribute__((unused)) int argc, __attribute__((unused)) char *argv[]) 
     162post_args(_U_ int argc, _U_ char *argv[]) 
    163163{ 
    164164    char ebuf[PCAP_ERRBUF_SIZE];