# HG changeset patch # User Tero Marttila # Date 1236609030 -7200 # Node ID 08a26d0b9afd6bd2c37cf71d8ef6f98795919958 # Parent 542c73d07d3ccd171dfa6f58d5f946e091272b01 fix ret/err bug in irc_conn_send, supress unused-argument warnings diff -r 542c73d07d3c -r 08a26d0b9afd src/irc_conn.c --- a/src/irc_conn.c Sun Mar 08 17:17:37 2009 +0200 +++ b/src/irc_conn.c Mon Mar 09 16:30:30 2009 +0200 @@ -11,6 +11,9 @@ */ static void on_RPL_WELCOME (struct irc_conn *conn, const struct irc_line *line, void *arg) { + (void) line; + (void) arg; + // update state conn->registered = true; @@ -24,6 +27,8 @@ */ static void on_PING (struct irc_conn *conn, const struct irc_line *line, void *arg) { + (void) arg; + // just reply irc_conn_PONG(conn, line->args[0]); } @@ -128,6 +133,7 @@ { char line_buf[IRC_LINE_MAX + 2]; err_t err; + int ret; // format if ((err = irc_line_build(line, line_buf))) @@ -141,7 +147,7 @@ // send using line_proto // XXX: ignore output-buffering - return (err = line_proto_send(conn->lp, line_buf)) < 0 ? err : SUCCESS; + return (ret = line_proto_send(conn->lp, line_buf)) < 0 ? -ret : SUCCESS; } err_t irc_conn_NICK (struct irc_conn *conn, const char *nickname)