diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-04-30 11:50:46 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-06-07 11:21:59 +0000 |
commit | 49ee68443d41ffe1ab72c964104da980a2eb4367 (patch) | |
tree | f87d2096fbd19c629390548c7b1d6351e3479851 /extras/libmemif/examples/icmp_responder | |
parent | 4168c4d914c36f76c45cd8c6dde207b9f1c688e2 (diff) |
build: add -Wall and -fno-common, fix reported issues
Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'extras/libmemif/examples/icmp_responder')
-rw-r--r-- | extras/libmemif/examples/icmp_responder/icmp_proto.c | 1 | ||||
-rw-r--r-- | extras/libmemif/examples/icmp_responder/main.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/extras/libmemif/examples/icmp_responder/icmp_proto.c b/extras/libmemif/examples/icmp_responder/icmp_proto.c index e1d255aca27..785aebd5567 100644 --- a/extras/libmemif/examples/icmp_responder/icmp_proto.c +++ b/extras/libmemif/examples/icmp_responder/icmp_proto.c @@ -458,7 +458,6 @@ int resolve_packet3 (void **pck_, uint32_t * size, uint8_t ip_addr[4]) { struct ether_header *eh; - struct ether_arp *eah; struct iphdr *ip; struct icmphdr *icmp; int32_t offset = 0; diff --git a/extras/libmemif/examples/icmp_responder/main.c b/extras/libmemif/examples/icmp_responder/main.c index fa7bcb9a636..2e85d0320d5 100644 --- a/extras/libmemif/examples/icmp_responder/main.c +++ b/extras/libmemif/examples/icmp_responder/main.c @@ -290,6 +290,7 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid) memif_connection_t *c = &memif_connection; int err; uint16_t rx; + uint16_t fb = 0; /* receive data from shared memory buffers */ err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx); c->rx_buf_num += rx; @@ -311,7 +312,6 @@ on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid) &(c->tx_bufs + i)->len, c->ip_addr); } - uint16_t fb; /* mark memif buffers and shared memory buffers as free */ err = memif_refill_queue (c->conn, qid, rx, 0); c->rx_buf_num -= fb; @@ -338,7 +338,6 @@ icmpr_memif_create (int is_master) { /* setting memif connection arguments */ memif_conn_args_t args; - int fd = -1; memset (&args, 0, sizeof (args)); args.is_master = is_master; args.log2_ring_size = 10; |