From 9c7eba2f6a28ac32e147aa6702f5b95a93b24ebf Mon Sep 17 00:00:00 2001 From: guillot Date: Mon, 1 Aug 2005 11:24:10 +0000 Subject: [PATCH] fixed compilation warnings --- src/bip.c | 4 +++- src/bipmkpw.c | 2 +- src/irc.c | 5 ++++- src/log.c | 2 ++ src/util.c | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/bip.c b/src/bip.c index 6770b4e..263bb0a 100644 --- a/src/bip.c +++ b/src/bip.c @@ -265,6 +265,7 @@ static void usage(char *name) void reload_config(int i) { + (void)i; sighup = 1; } @@ -490,7 +491,7 @@ static int add_user(list_t *data) int r; struct tuple *t; struct c_user *u; - struct c_user *old_u; + struct c_user *old_u = 0; u = calloc(sizeof(struct c_user), 1); list_init(&u->connectionl, NULL); @@ -717,6 +718,7 @@ int fireup(FILE *conf) void print_link(struct link *l) { + (void)l; printf("\n"); } diff --git a/src/bipmkpw.c b/src/bipmkpw.c index e81a034..31a134a 100644 --- a/src/bipmkpw.c +++ b/src/bipmkpw.c @@ -53,7 +53,7 @@ void readpass(char *buffer, int buflen) close(ttyfd); } -int main(int argc __attribute__((unused)), char **argv __attribute__((unused))) +int main(void) { int i; static char str[256]; diff --git a/src/irc.c b/src/irc.c index 15c7c44..ac5bad0 100644 --- a/src/irc.c +++ b/src/irc.c @@ -587,6 +587,7 @@ static int irc_cli_startup(struct link_client *ic, struct line *line, char *initmask; char *init_nick; char *user, *pass, *connname; + (void)line; if (!ic->init_pass) fatal("internal irc_cli_startup"); @@ -767,6 +768,8 @@ static int irc_cli_pass(struct link_client *ic, struct line *line, list_t *cl) static int irc_cli_quit(struct link_client *ic, struct line *line) { + (void)ic; + (void)line; return OK_CLOSE; } @@ -870,7 +873,7 @@ static int irc_cli_join(struct link_client *irc, struct line *line) if (line->elemc != 2 && line->elemc != 3) return ERR_PROTOCOL; - char *s, *e, *ks, *ke; + char *s, *e, *ks, *ke = 0; s = line->elemv[1]; if (line->elemc == 3) ks = line->elemv[2]; diff --git a/src/log.c b/src/log.c index 3818536..41a79a3 100644 --- a/src/log.c +++ b/src/log.c @@ -597,6 +597,7 @@ void log_connected(log_t *logdata) void log_client_disconnected(log_t *logdata) { + (void)logdata; mylog(LOG_DEBUG, "A client disconnected"); } @@ -627,6 +628,7 @@ void log_client_connected(log_t *logdata) void log_advance_backlogs(log_t* ld, logfilegroup_t *lfg) { int c; + (void)ld; if (!conf_backlog || conf_backlog_lines == 0) return; diff --git a/src/util.c b/src/util.c index c96290e..0efca7b 100644 --- a/src/util.c +++ b/src/util.c @@ -288,7 +288,7 @@ void *list_remove_if_exists(list_t *list, void *ptr) { list_iterator_t li; int debug = 0; - void *ret; + void *ret = 0; if (!list->cmp) fatal("list_remove: list does not have a cmp function\n");