From a6210c453a1662ad8af7088b0b446541f0069e02 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 1 Mar 2009 01:53:40 +0100 Subject: [PATCH] Remove some unused variables. Found with llvm static analyzer. --- modules/core/m_server.c | 3 +-- modules/m_accept.c | 3 +-- modules/m_kline.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/core/m_server.c b/modules/core/m_server.c index 9007fd8..e4abd35 100644 --- a/modules/core/m_server.c +++ b/modules/core/m_server.c @@ -642,7 +642,6 @@ set_server_gecos(struct Client *client_p, const char *info) { char *p; char *s; - char *t; s = LOCAL_COPY(info); @@ -651,7 +650,7 @@ set_server_gecos(struct Client *client_p, const char *info) *p = '\0'; /* check for a ] which would symbolise an [IP] */ - if((t = strchr(s, ']'))) + if(strchr(s, ']')) { /* set s to after the first space */ if(p) diff --git a/modules/m_accept.c b/modules/m_accept.c index 06a341b..07c2227 100644 --- a/modules/m_accept.c +++ b/modules/m_accept.c @@ -151,7 +151,6 @@ build_nicklist(struct Client *source_p, char *addbuf, char *delbuf, const char * int lenadd; int lendel; int del; - struct Client *target_p; char *n = LOCAL_COPY(nicks); *addbuf = *delbuf = '\0'; @@ -166,7 +165,7 @@ build_nicklist(struct Client *source_p, char *addbuf, char *delbuf, const char * name++; } - if((target_p = find_named_person(name)) == NULL) + if(find_named_person(name) == NULL) { sendto_one_numeric(source_p, ERR_NOSUCHNICK, form_str(ERR_NOSUCHNICK), name); diff --git a/modules/m_kline.c b/modules/m_kline.c index 77aa15d..5bcfa70 100644 --- a/modules/m_kline.c +++ b/modules/m_kline.c @@ -96,11 +96,10 @@ static int mo_kline(struct Client *client_p, struct Client *source_p, int parc, const char **parv) { - char def[] = "No Reason"; char user[USERLEN + 2]; char host[HOSTLEN + 2]; char buffer[IRCD_BUFSIZE]; - char *reason = def; + char *reason; char *oper_reason; const char *current_date; const char *target_server = NULL;