aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/examples/icmp_responder/main.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-04-30 11:50:46 +0200
committerDamjan Marion <dmarion@me.com>2019-06-07 11:21:59 +0000
commit49ee68443d41ffe1ab72c964104da980a2eb4367 (patch)
treef87d2096fbd19c629390548c7b1d6351e3479851 /extras/libmemif/examples/icmp_responder/main.c
parent4168c4d914c36f76c45cd8c6dde207b9f1c688e2 (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/main.c')
-rw-r--r--extras/libmemif/examples/icmp_responder/main.c3
1 files changed, 1 insertions, 2 deletions
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;