From d7dc7ae6c1563a32d2002a5ac8a6ab6b997ddd7f Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 29 Aug 2008 02:53:52 +0200 Subject: [PATCH] Remove some dead code. found using llvm static analyzer --- modules/core/m_message.c | 3 --- modules/m_whois.c | 7 ------- src/client.c | 3 --- src/extban.c | 5 +---- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/core/m_message.c b/modules/core/m_message.c index fc0896ff..658a2a30 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -916,7 +916,6 @@ handle_special(int p_or_n, const char *command, struct Client *client_p, struct Client *target_p; char *server; char *s; - int count; /* user[%host]@server addressed? * NOTE: users can send to user@server, but not user%host@server @@ -931,8 +930,6 @@ handle_special(int p_or_n, const char *command, struct Client *client_p, return; } - count = 0; - if(!IsOper(source_p)) { if(strchr(nick, '%') || (strncmp(nick, "opers", 5) == 0)) diff --git a/modules/m_whois.c b/modules/m_whois.c index 54c71a1d..40a8d52e 100644 --- a/modules/m_whois.c +++ b/modules/m_whois.c @@ -239,16 +239,9 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy) char *t; int tlen; hook_data_client hdata; - char *name; - char quest[] = "?"; int visible; int extra_space = 0; - if(target_p->name[0] == '\0') - name = quest; - else - name = target_p->name; - if(target_p->user == NULL) { s_assert(0); diff --git a/src/client.c b/src/client.c index 8e8dd681..0f717bc7 100644 --- a/src/client.c +++ b/src/client.c @@ -1361,15 +1361,12 @@ static int qs_server(struct Client *client_p, struct Client *source_p, struct Client *from, const char *comment) { - struct Client *target_p; - if(source_p->servptr && source_p->servptr->serv) rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers); else s_assert(0); rb_dlinkFindDestroy(source_p, &global_serv_list); - target_p = source_p->from; if(has_id(source_p)) del_from_id_hash(source_p->id, source_p); diff --git a/src/extban.c b/src/extban.c index c8a04df9..8890fcca 100644 --- a/src/extban.c +++ b/src/extban.c @@ -68,17 +68,14 @@ int valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type) { const char *p; - int invert = 0, result = EXTBAN_INVALID; + int result = EXTBAN_INVALID; ExtbanFunc f; if (*banstr != '$') return 0; p = banstr + 1; if (*p == '~') - { - invert = 1; p++; - } f = extban_table[(unsigned char) ToLower(*p)]; if (*p != '\0') {