Changeset a3041a4 for lib


Ignore:
Timestamp:
01/10/12 14:15:58 (10 years ago)
Author:
Shane Alcock <salcock@…>
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:
8753bb8
Parents:
a0ec6f1
Message:
  • Fixed "unused but set" warnings that new gcc now likes to report
Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r997614d ra3041a4  
    141141         * other platforms, e.g. *BSDs, Windows */
    142142        struct tm tm;
    143         char *tz;
    144143        time_t ret;
    145144
     
    155154        tm.tm_isdst = -1; /* forces check for summer time */
    156155       
    157         tz = getenv("TZ");
     156        getenv("TZ");
    158157        if (putenv("TZ=Pacific/Auckland")) {
    159158                perror("putenv");
     
    440439        uint32_t hdr_ts;
    441440
    442         double dts;
    443        
    444441        legacy_nzix_t *legacy = (legacy_nzix_t *)packet->header;
    445442               
     
    461458
    462459
    463         dts = tv.tv_sec + (double)tv.tv_usec / 1000 / 1000;
     460        /*dts = tv.tv_sec + (double)tv.tv_usec / 1000 / 1000; */
    464461        return tv;
    465462       
  • lib/format_linux.c

    r078bd65 ra3041a4  
    459459        unsigned char controlbuf[CMSG_BUF_SIZE];
    460460        struct cmsghdr *cmsg;
    461         socklen_t socklen;
    462461        int snaplen;
    463462        uint32_t flags = 0;
     
    475474
    476475        hdr=(struct libtrace_linuxnative_header*)packet->buffer;
    477         socklen=sizeof(hdr->hdr);
    478476        snaplen=LIBTRACE_MIN(
    479477                        (int)LIBTRACE_PACKET_BUFSIZE-(int)sizeof(*hdr),
  • lib/trace.c

    r979a84f4 ra3041a4  
    501501{
    502502        int ret;
    503         libtrace_err_t err;
    504503
    505504        if (trace_is_err(libtrace)) {
     
    522521                        /* Clear the error if there was one */
    523522                        if (trace_is_err(libtrace)) {
    524                                 err = trace_get_err(libtrace);
     523                                trace_get_err(libtrace);
    525524                        }
    526525                        if (*(int*)value<0
     
    534533                        /* Clear the error if there was one */
    535534                        if (trace_is_err(libtrace)) {
    536                                 err = trace_get_err(libtrace);
     535                                trace_get_err(libtrace);
    537536                        }
    538537                        libtrace->filter=(libtrace_filter_t *)value;
Note: See TracChangeset for help on using the changeset viewer.