Changeset 85a79b0 for lib/format_linux.c


Ignore:
Timestamp:
08/25/06 15:47:43 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
e283596
Parents:
e373992
Message:

Fixed lots of warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    rc0cd256 r85a79b0  
    4949#include <net/if.h>
    5050#include <sys/ioctl.h>
    51 
    52 static struct libtrace_format_t linuxnative;
    5351
    5452struct libtrace_format_data_t {
     
    218216        packet->payload = (char*)packet->buffer+sizeof(*hdr);
    219217
    220         hdr=(void*)packet->buffer;
     218        hdr=(struct libtrace_linuxnative_header*)packet->buffer;
    221219        socklen=sizeof(hdr->hdr);
    222220        snaplen=LIBTRACE_MIN(
     
    227225                        snaplen,
    228226                        MSG_TRUNC,
    229                         (void *)&hdr->hdr,
     227                        (struct sockaddr *)&hdr->hdr,
    230228                        &socklen);
    231229
     
    242240
    243241static int linuxnative_write_packet(libtrace_out_t *trace,
    244                 const libtrace_packet_t *packet)
     242                libtrace_packet_t *packet)
    245243{
    246244        struct sockaddr_ll hdr;
     
    272270                default: /* shrug, beyond me! */
    273271                        printf("unknown type %x\n",linktype);
    274                         return -1;
     272                        return (libtrace_linktype_t)~0U;
    275273        }
    276274}
     
    300298}
    301299
    302 static int linuxnative_get_framing_length(const libtrace_packet_t *packet)
     300static int linuxnative_get_framing_length(UNUSED
     301                const libtrace_packet_t *packet)
    303302{
    304303        return sizeof(struct libtrace_linuxnative_header);
Note: See TracChangeset for help on using the changeset viewer.