Fix GCC warnings.

This commit is contained in:
Arnaud Fontaine 2011-10-03 15:25:26 +09:00 committed by Pierre-Louis Bonicoli
parent 559fa7ed44
commit 0da434d126
5 changed files with 8 additions and 16 deletions

View File

@ -1570,9 +1570,6 @@ void adm_list_users(struct link_client *ic)
hash_iterator_t it;
hash_iterator_t lit;
char buf[RET_STR_LEN + 1];
connection_t *c;
c = CONN(ic);
bip_notify(ic, "-- User list");
for (hash_it_init(&_bip->users, &it); hash_it_item(&it);
@ -1620,9 +1617,6 @@ void adm_list_networks(struct link_client *ic)
{
hash_iterator_t it;
char buf[RET_STR_LEN + 1];
connection_t *c;
c = CONN(ic);
bip_notify(ic, "-- Network list (* means SSL):");
for (hash_it_init(&_bip->networks, &it); hash_it_item(&it);
@ -1669,9 +1663,7 @@ noroom:
void adm_list_connections(struct link_client *ic, struct bipuser *bu)
{
hash_iterator_t it;
connection_t *c;
c = CONN(ic);
if (!bu) {
bip_notify(ic, "-- Your connections:");
bu = LINK(ic)->user;

View File

@ -1090,7 +1090,8 @@ static DH *dh_1024(void)
}
/* ripped from postfix's tls_dh.c */
static DH *tmp_dh_cb(SSL *ssl_unused, int export, int keylength)
static DH *tmp_dh_cb(SSL *ssl_unused __attribute__((unused)),
int export, int keylength)
{
DH *ret;
@ -1351,7 +1352,7 @@ static int SSLize(connection_t *cn, int *nc)
ERR_print_errors(errbio);
if (err2 == SSL_ERROR_NONE) {
SSL_CIPHER *cipher;
const SSL_CIPHER *cipher;
char buf[128];
int len;

View File

@ -308,7 +308,8 @@ static int irc_352(struct link_server *server, struct line *line)
return OK_COPY_WHO;
}
static int irc_315(struct link_server *server, struct line *l)
static int irc_315(struct link_server *server,
struct line *l __attribute__((unused)))
{
struct link *link = LINK(server);
if (link->who_client) {
@ -325,7 +326,6 @@ static int irc_315(struct link_server *server, struct line *l)
link->who_client, link->who_client->who_count);
}
}
l = NULL; /* keep gcc happy */
return OK_COPY_WHO;
}
@ -1455,7 +1455,8 @@ static int irc_367(struct link_server *server, struct line *l)
}
/* same as irc_315 */
static int irc_368(struct link_server *server, struct line *l)
static int irc_368(struct link_server *server,
struct line *l __attribute__((unused)))
{
struct link *link = LINK(server);
if (link->who_client) {
@ -1473,7 +1474,6 @@ static int irc_368(struct link_server *server, struct line *l)
link->who_client, link->who_client->who_count);
}
}
l = NULL; /* keep gcc happy */
return OK_COPY_WHO;
}

View File

@ -1,3 +1,4 @@
%option nounput noinput
%{
/*
* $Id: lex.l,v 1.23 2005/04/12 19:34:35 nohar Exp $

View File

@ -655,14 +655,12 @@ void log_ping_timeout(log_t *logdata)
void log_connected(log_t *logdata)
{
logstore_t *store;
hash_iterator_t hi;
snprintf(logdata->buffer, LOGLINE_MAXLEN, "%s -!- Connected to"
" server...", timestamp());
for (hash_it_init(&logdata->logfgs, &hi); hash_it_item(&hi);
hash_it_next(&hi)) {
store = hash_it_item(&hi);
log_write(logdata, hash_it_key(&hi), logdata->buffer);
}
}