From 5980dda3d11dc08da4b3437eff3aaee7d3a55d1c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 24 May 2013 21:02:55 +0000 Subject: [PATCH] - fix some various warnings --- src/fdlist.c | 8 ++++---- src/parse.c | 6 +++--- src/s_bsd.c | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/fdlist.c b/src/fdlist.c index 705241fce..9bc1ff335 100644 --- a/src/fdlist.c +++ b/src/fdlist.c @@ -104,9 +104,9 @@ void fd_close(int fd) if (!fde->is_open) { sendto_realops("[BUG] trying to close fd #%d in fd table, but this FD isn't reported open", - fd, MAXCONNECTIONS); + fd); ircd_log(LOG_ERROR, "[BUG] trying to close fd #%d in fd table, but this FD isn't reported open", - fd, MAXCONNECTIONS); + fd); return; } @@ -158,9 +158,9 @@ void fd_desc(int fd, const char *desc) if (!fde->is_open) { sendto_realops("[BUG] trying to modify fd #%d in fd table, but this FD isn't reported open", - fd, MAXCONNECTIONS); + fd); ircd_log(LOG_ERROR, "[BUG] trying to modify fd #%d in fd table, but this FD isn't reported open", - fd, MAXCONNECTIONS); + fd); return; } diff --git a/src/parse.c b/src/parse.c index f8b72e54e..e1d95cdd7 100644 --- a/src/parse.c +++ b/src/parse.c @@ -188,7 +188,7 @@ int parse(aClient *cptr, char *buffer, char *bufend) int buf_len = 0; aClient *from = cptr; char *ch, *s; - int len, i, numeric = 0, paramcount, noprefix = 0; + int len, i, numeric = 0, paramcount; #ifdef DEBUGMODE time_t then, ticks; int retval; @@ -279,8 +279,7 @@ int parse(aClient *cptr, char *buffer, char *bufend) while (*ch == ' ') ch++; } - else - noprefix = 1; + if (*ch == '\0') { ircstp->is_empt++; @@ -290,6 +289,7 @@ int parse(aClient *cptr, char *buffer, char *bufend) cptr->since++; /* 1s fake lag */ return (-1); } + /* ** Extract the command code from the packet. Point s to the end ** of the command code and calculate the length using pointer diff --git a/src/s_bsd.c b/src/s_bsd.c index 2f5f93c80..e0a03b148 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -102,7 +102,6 @@ static struct SOCKADDR_IN mysk; static struct SOCKADDR *connect_inet(ConfigItem_link *, aClient *, int *); void completed_connection(int, int, void *); static int check_init(aClient *, char *, size_t); -static void do_dns_async(); void set_sock_opts(int, aClient *); static char readbuf[BUFSIZE]; char zlinebuf[BUFSIZE]; @@ -1391,6 +1390,8 @@ static int parse_client_queued(aClient *cptr) if (dopacket(cptr, buf, dolen) == FLUSH_BUFFER) return FLUSH_BUFFER; } + + return 0; } void read_packet(int fd, int revents, void *data)