From 3e456f175a6e25e30e60934ff08c7108b1f86654 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 30 Dec 2010 23:03:28 +0100 Subject: utils: resolve compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make nfulnl_test ulog_test make[1]: Entering directory `/home/jengelh/code/libnetfilter_log/utils' CC nfulnl_test.o nfulnl_test.c: In function "cb": nfulnl_test.c:47:1: warning: no return statement in function returning non-void nfulnl_test.c: In function "main": nfulnl_test.c:102:20: warning: unused variable "nlh" CCLD nfulnl_test CC ulog_test.o ulog_test.c: In function "handle_packet": ulog_test.c:27:9: warning: format "%d" expects type ‘int’, but argument 4 has type ‘size_t’ ulog_test.c: In function "main": ulog_test.c:79:3: warning: suggest parentheses around assignment used as truth value CCLD ulog_test make[1]: Leaving directory `/home/jengelh/code/libnetfilter_log/utils' Signed-off-by: Jan Engelhardt --- utils/nfulnl_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/nfulnl_test.c') diff --git a/utils/nfulnl_test.c b/utils/nfulnl_test.c index 139013d..ae5da79 100644 --- a/utils/nfulnl_test.c +++ b/utils/nfulnl_test.c @@ -44,6 +44,7 @@ static int cb(struct nflog_g_handle *gh, struct nfgenmsg *nfmsg, struct nflog_data *nfa, void *data) { print_pkt(nfa); + return 0; } @@ -99,7 +100,6 @@ int main(int argc, char **argv) printf("going into main loop\n"); while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0) { - struct nlmsghdr *nlh; printf("pkt received (len=%u)\n", rv); /* handle messages in just-received packet */ @@ -121,5 +121,5 @@ int main(int argc, char **argv) printf("closing handle\n"); nflog_close(h); - exit(0); + return EXIT_SUCCESS; } -- cgit v1.2.3