diff options
author | Eric Leblond <eric@inl.fr> | 2008-07-29 12:24:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-07-29 12:24:18 +0200 |
commit | 9fdec30e232e74e103d80049e0772f2d619574cb (patch) | |
tree | 2accb1df1bf455458c16023f189bb730f6085fd1 /util | |
parent | cd8abed46eff3683a5d81e500673df5e80e2a353 (diff) |
cleanup: fix gcc warnings
This patch fixes some gcc warnings:
* Unused variables
* Functions with wrong return (or without return)
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/db.c | 5 | ||||
-rw-r--r-- | util/printpkt.c | 2 |
2 files changed, 1 insertions, 6 deletions
@@ -31,6 +31,7 @@ #include <errno.h> #include <netinet/in.h> #include <arpa/inet.h> +#include <time.h> #include <ulogd/ulogd.h> #include <ulogd/db.h> @@ -62,8 +63,6 @@ static int sql_createstmt(struct ulogd_pluginstance *upi) { struct db_instance *mi = (struct db_instance *) upi->private; unsigned int size; - char buf[ULOGD_MAX_KEYLEN]; - char *underscore; int i; char *table = table_ce(upi->config_kset).u.string; char *procedure = procedure_ce(upi->config_kset).u.string; @@ -245,8 +244,6 @@ static int __interp_db(struct ulogd_pluginstance *upi) } switch (res->type) { - char *tmpstr; - struct in_addr addr; case ULOGD_RET_INT8: sprintf(di->stmt_ins, "%d,", res->u.value.i8); break; diff --git a/util/printpkt.c b/util/printpkt.c index 90fec0e..c64a4cb 100644 --- a/util/printpkt.c +++ b/util/printpkt.c @@ -276,7 +276,6 @@ static int printpkt_ipv4(struct ulogd_key *res, char *buf) static int printpkt_ipv6(struct ulogd_key *res, char *buf) { char *buf_cur = buf; - char tmp[INET6_ADDRSTRLEN]; if (pp_is_valid(res, KEY_IP_SADDR)) buf_cur += sprintf(buf_cur, "SRC=%s ", @@ -353,7 +352,6 @@ int printpkt_arp(struct ulogd_key *res, char *buf) char *buf_cur = buf; u_int16_t code = 0; u_int8_t *mac; - char tmp[INET_ADDRSTRLEN]; if (pp_is_valid(res, KEY_ARP_SPA)) buf_cur += sprintf(buf_cur, "SRC=%s ", |