Changeset 4bd8a5b for lib/format_linux.c


Ignore:
Timestamp:
12/24/06 17:05:29 (14 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:
870e501
Parents:
778d459
Message:

Cleanup a gazillion warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_linux.c

    r496b8e5 r4bd8a5b  
    118118        if (bind(FORMAT(libtrace->format_data)->fd,
    119119                                (struct sockaddr*)&addr,
    120                                 sizeof(addr))==-1) {
     120                                (socklen_t)sizeof(addr))==-1) {
    121121                free(libtrace->format_data);
    122122                return -1;
     
    151151                        SO_TIMESTAMP,
    152152                        &one,
    153                         sizeof(one))==-1) {
     153                        (socklen_t)sizeof(one))==-1) {
    154154                perror("setsockopt(SO_TIMESTAMP)");
    155155        }
     
    237237
    238238        if (!packet->buffer || packet->buf_control == TRACE_CTRL_EXTERNAL) {
    239                 packet->buffer = malloc(LIBTRACE_PACKET_BUFSIZE);
     239                packet->buffer = malloc((size_t)LIBTRACE_PACKET_BUFSIZE);
    240240                packet->buf_control = TRACE_CTRL_PACKET;
    241241        }
     
    303303        hdr.sll_pkttype = 0;
    304304        hdr.sll_halen = htons(6); /* FIXME */
    305         memcpy(hdr.sll_addr,packet->payload,hdr.sll_halen);
     305        memcpy(hdr.sll_addr,packet->payload,(size_t)hdr.sll_halen);
    306306
    307307        return sendto(DATAOUT(trace)->fd,
     
    309309                        trace_get_capture_length(packet),
    310310                        0,
    311                         (struct sockaddr*)&hdr, sizeof(hdr));
     311                        (struct sockaddr*)&hdr, (socklen_t)sizeof(hdr));
    312312
    313313}
Note: See TracChangeset for help on using the changeset viewer.