Changeset 4bd8a5b for lib/trace.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/trace.c

    r778d459 r4bd8a5b  
    224224                pcap_constructor();
    225225#endif
    226 #if HAVE_BIOCSETIF
     226#ifdef HAVE_BIOCSETIF
    227227                bpf_constructor();
    228228#endif
     
    252252}
    253253
    254 #define RP_BUFSIZE 65536
    255 #define URI_PROTO_LINE 16
     254#define URI_PROTO_LINE 16U
    256255
    257256
     
    375374                xstrncpy(scan, uri, strlen(uri));
    376375        } else {
    377                 xstrncpy(scan,uri, (uridata - uri));
     376                xstrncpy(scan,uri, (size_t)(uridata - uri));
    378377        }
    379378       
     
    606605{
    607606        libtrace_packet_t *packet =
    608                 (libtrace_packet_t*)calloc(1,sizeof(libtrace_packet_t));
     607                (libtrace_packet_t*)calloc((size_t)1,sizeof(libtrace_packet_t));
    609608        packet->buf_control=TRACE_CTRL_PACKET;
    610609        return packet;
     
    966965                }
    967966                pcap=(pcap_t *)pcap_open_dead(
    968                                 libtrace_to_pcap_dlt(linktype),
    969                                 1500);
     967                                (int)libtrace_to_pcap_dlt(linktype),
     968                                1500U);
    970969                /* build filter */
    971970                if (pcap_compile( pcap, &filter->filter, filter->filterstring,
     
    12341233        }
    12351234
    1236         *format=xstrndup(uri, (uridata - uri));
     1235        *format=xstrndup(uri, (size_t)(uridata - uri));
    12371236
    12381237        /* push uridata past the delimiter */
     
    13971396        if (!buf2)
    13981397                buf2=staticbuf;
    1399         snprintf(buf2,18,"%02x:%02x:%02x:%02x:%02x:%02x",
     1398        snprintf(buf2,(size_t)18,"%02x:%02x:%02x:%02x:%02x:%02x",
    14001399                        addr[0],addr[1],addr[2],
    14011400                        addr[3],addr[4],addr[5]);
     
    14471446        packet->payload=(void*)((char*)packet->buffer+sizeof(hdr));
    14481447        memcpy(packet->header,&hdr,sizeof(hdr));
    1449         memcpy(packet->payload,data,len);
     1448        memcpy(packet->payload,data,(size_t)len);
    14501449        packet->type=pcap_dlt_to_rt(libtrace_to_pcap_dlt(linktype));
    14511450}
Note: See TracChangeset for help on using the changeset viewer.