Changeset 5da3315


Ignore:
Timestamp:
04/08/06 13:55:10 (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:
6b2d5ed
Parents:
aa67e26
Message:

avoid warnings about format specifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/fifo.c

    raa67e26 r5da3315  
    183183                tracefifo_stat_buffer = (char *)malloc(513);
    184184
    185         bzero(tracefifo_stat_buffer,513);
     185        memset(tracefifo_stat_buffer,0,513);
    186186        scan = tracefifo_stat_buffer;
    187187        if (desc)
    188188                scan += sprintf(scan,"%s\t",desc);
    189         scan += sprintf(scan,"in:   %d \t",fifo->datamap[FIFO_PTR_IN]);
    190         scan += sprintf(scan,"sent: %d\t", fifo->datamap[FIFO_PTR_OUT]);
    191         scan += sprintf(scan,"ack:  %d\t", fifo->datamap[FIFO_PTR_ACK]);
     189        scan += sprintf(scan,"in:   %" PRIu64 " \t",(uint64_t)fifo->datamap[FIFO_PTR_IN]);
     190        scan += sprintf(scan,"sent: %" PRIu64 "\t", (uint64_t)fifo->datamap[FIFO_PTR_OUT]);
     191        scan += sprintf(scan,"ack:  %" PRIu64 "\t", (uint64_t)fifo->datamap[FIFO_PTR_ACK]);
    192192        if (delta > 0)
    193                 scan += sprintf(scan,"delta: %d\t", delta);
    194         scan += sprintf(scan,"Size: %d", tracefifo_compare(fifo,FIFO_PTR_IN,FIFO_PTR_ACK));
     193                scan += sprintf(scan,"delta: %" PRIi64 "\t", (int64_t)delta);
     194        scan += sprintf(scan,"Size: %" PRIu64, (uint64_t)tracefifo_compare(fifo,FIFO_PTR_IN,FIFO_PTR_ACK));
    195195        scan += sprintf(scan,"\n");
    196196        return tracefifo_stat_buffer;
Note: See TracChangeset for help on using the changeset viewer.