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>
diff --git a/extras/libmemif/examples/icmp_responder-epoll/main.c b/extras/libmemif/examples/icmp_responder-epoll/main.c
index 02414fa..ecc05a4 100644
--- a/extras/libmemif/examples/icmp_responder-epoll/main.c
+++ b/extras/libmemif/examples/icmp_responder-epoll/main.c
@@ -372,7 +372,6 @@
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb = 0;
int i = 0; /* rx buffer iterator */
int j = 0; /* tx bufferiterator */
@@ -457,10 +456,8 @@
int err = MEMIF_ERR_SUCCESS, ret_val;
uint16_t rx = 0, tx = 0;
- uint16_t fb;
int i; /* rx buffer iterator */
int j; /* tx bufferiterator */
- int prev_i; /* first allocated rx buffer */
/* loop while there are packets in shm */
do
@@ -475,7 +472,7 @@
goto error;
}
- prev_i = i = 0;
+ i = 0;
/* loop while there are RX buffers to be processed */
while (rx)
@@ -522,7 +519,6 @@
if (err != MEMIF_ERR_SUCCESS)
INFO ("memif_buffer_free: %s", memif_strerror (err));
rx -= j;
- prev_i = i;
DBG ("freed %d buffers. %u/%u alloc/free buffers",
fb, rx, MAX_MEMIF_BUFS - rx);
@@ -570,8 +566,6 @@
int err = MEMIF_ERR_SUCCESS, ret_val;
int i;
uint16_t rx, tx;
- uint16_t fb;
- uint16_t pck_seq;
do
{
@@ -639,7 +633,6 @@
/* setting memif connection arguments */
memif_conn_args_t args;
- int fd = -1;
memset (&args, 0, sizeof (args));
args.is_master = mode;
args.log2_ring_size = 11;
@@ -1106,7 +1099,6 @@
int
user_input_handler ()
{
- int i;
char *in = (char *) malloc (256);
char *ui = fgets (in, 256, stdin);
char *end;
@@ -1223,9 +1215,8 @@
int
poll_event (int timeout)
{
- struct epoll_event evt, *e;
+ struct epoll_event evt;
int app_err = 0, memif_err = 0, en = 0;
- int tmp, nfd;
uint32_t events = 0;
struct timespec start, end;
memset (&evt, 0, sizeof (evt));