Changeset 9c6aa95 for lib/fifo.c


Ignore:
Timestamp:
10/07/05 17:31:17 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
9daf398
Parents:
5c88a60
Message:

cleaned up after compiling with -Wall -W

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/fifo.c

    rb5cd711 r9c6aa95  
    6969
    7070static void increment_pointer(struct tracefifo_t *fifo, enum which_t which, int amount);
    71 static void set_pointer(struct tracefifo_t *fifo, enum which_t which, int location);
     71static void set_pointer(struct tracefifo_t *fifo, enum which_t which, unsigned int location);
    7272static size_t tracefifo_compare(struct tracefifo_t *fifo, enum which_t first, enum which_t second);
    7373static int tracefifo_read_generic(struct tracefifo_t *fifo, void *buffer, size_t len, enum which_t which, char update);
     
    115115}
    116116
    117 void tracefifo_flush(struct tracefifo_t *fifo) {
     117void tracefifo_flush(struct tracefifo_t *fifo __attribute__((unused))) {
    118118        // do nothing
    119119        return;
    120120}
    121121
    122 static void set_pointer(struct tracefifo_t *fifo, enum which_t which, int location) {
     122static void set_pointer(struct tracefifo_t *fifo, enum which_t which, unsigned int location) {
    123123        assert(fifo);
    124124        assert(which == IN || which == OUT || which == ACK);
    125         assert(location >= 0);
    126125
    127126        assert(location <= fifo->length);
     
    212211        assert(fifo);
    213212        assert(buffer);
    214         assert(len >= 0);
    215213
    216214        oldptr = fifo->datamap[which];
     
    237235        assert(fifo);
    238236        assert(buffer);
    239         assert(len >= 0);
    240237
    241238        if (tracefifo_free(fifo) < len) {
     
    260257        assert(fifo);
    261258        assert(buffer);
    262         assert(len >= 0);
    263259        if (tracefifo_compare(fifo,IN,OUT) < len) {
    264260                return 0;
     
    270266        assert(fifo);
    271267        assert(buffer);
    272         assert(len >= 0);
    273268        if (tracefifo_compare(fifo,OUT,ACK) < len) {
    274269                return 0;
     
    279274int tracefifo_out_update(struct tracefifo_t *fifo, size_t len){
    280275        assert(fifo);
    281         assert(len >= 0);
    282276        if (tracefifo_compare(fifo,IN,OUT) < len) {
    283277                return 0;
     
    289283int tracefifo_ack_update(struct tracefifo_t *fifo, size_t len){
    290284        assert(fifo);
    291         assert(len >= 0);
    292285        if (tracefifo_compare(fifo,OUT,ACK) < len) {
    293286                return 0;
Note: See TracChangeset for help on using the changeset viewer.