diff options
| author | Adam <Adam@anope.org> | 2012-10-31 22:16:15 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-10-31 22:16:15 -0400 |
| commit | e0c3069c5fe847cd1b000a14ac140a13182d2743 (patch) | |
| tree | 431d0cf62f648e0a6d90bd1d1ca52b10aba0e5fd /src/core | |
| parent | 3e6d8382853d3dd6ca371220a4a2891d5a56acc5 (diff) | |
Cleanup many compile warnings from make and make strict
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/cs_akick.c | 11 | ||||
| -rw-r--r-- | src/core/enc_old.c | 2 | ||||
| -rw-r--r-- | src/core/enc_sha1.c | 8 | ||||
| -rw-r--r-- | src/core/os_ignore.c | 2 |
4 files changed, 5 insertions, 18 deletions
diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c index 36ca62e60..b312ec1b5 100644 --- a/src/core/cs_akick.c +++ b/src/core/cs_akick.c @@ -368,8 +368,6 @@ static int do_akick(User * u) free(mask); } else if (stricmp(cmd, "STICK") == 0) { - NickAlias *na; - NickCore *nc; if (readonly) { notice_lang(s_ChanServ, u, CHAN_AKICK_DISABLED); @@ -381,9 +379,6 @@ static int do_akick(User * u) return MOD_CONT; } - na = findnick(mask); - nc = (na ? na->nc : NULL); - for (akick = ci->akick, i = 0; i < ci->akickcount; akick++, i++) { if (!(akick->flags & AK_USED) || (akick->flags & AK_ISNICK)) continue; @@ -406,9 +401,6 @@ static int do_akick(User * u) if (ci->c) stick_mask(ci, akick); } else if (stricmp(cmd, "UNSTICK") == 0) { - NickAlias *na; - NickCore *nc; - if (readonly) { notice_lang(s_ChanServ, u, CHAN_AKICK_DISABLED); return MOD_CONT; @@ -419,9 +411,6 @@ static int do_akick(User * u) return MOD_CONT; } - na = findnick(mask); - nc = (na ? na->nc : NULL); - for (akick = ci->akick, i = 0; i < ci->akickcount; akick++, i++) { if (!(akick->flags & AK_USED) || (akick->flags & AK_ISNICK)) continue; diff --git a/src/core/enc_old.c b/src/core/enc_old.c index e4c113d70..3efcc26c7 100644 --- a/src/core/enc_old.c +++ b/src/core/enc_old.c @@ -380,7 +380,7 @@ static int old_encrypt(const char *src, int len, char *dest, int size) if(debug) { memset(tmp,0,33); - my_binary_to_hex(dest,tmp,16); + my_binary_to_hex((unsigned char *) dest,tmp,16); alog("enc_old: Converted [%s] to [%s]",src,tmp); } diff --git a/src/core/enc_sha1.c b/src/core/enc_sha1.c index 1ed47ee90..332e2c902 100644 --- a/src/core/enc_sha1.c +++ b/src/core/enc_sha1.c @@ -178,7 +178,7 @@ static void SHA1Final(unsigned char digest[20], SHA1_CTX* context) static int sha1_encrypt(const char *src, int len, char *dest, int size) { SHA1_CTX context; - unsigned char tmp[41]; + char tmp[41]; if (size < 20) return -1; @@ -186,12 +186,12 @@ static int sha1_encrypt(const char *src, int len, char *dest, int size) memset(dest,0,size); SHA1Init(&context); - SHA1Update(&context, src, len); - SHA1Final(dest, &context); + SHA1Update(&context, (const unsigned char *) src, len); + SHA1Final((unsigned char *) dest, &context); if(debug) { memset(tmp,0,41); - binary_to_hex(dest,tmp,20); + binary_to_hex((unsigned char *) dest,tmp,20); /* Dont log source if we were encrypting in place :) */ if (memcmp(src, dest, 20) != 0) { alog("enc_sha1: hashed from [%s] to [%s]",src,tmp); diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c index 8ebb8132f..b981c2b56 100644 --- a/src/core/os_ignore.c +++ b/src/core/os_ignore.c @@ -78,7 +78,6 @@ static int do_ignoreuser(User * u) if (!stricmp(cmd, "ADD")) { char *time = strtok(NULL, " "); char *nick = strtok(NULL, " "); - char *rest = strtok(NULL, ""); if (!nick) { syntax_error(s_OperServ, u, "IGNORE", OPER_IGNORE_SYNTAX); @@ -88,7 +87,6 @@ static int do_ignoreuser(User * u) return MOD_CONT; } else { t = dotime(time); - rest = NULL; if (t <= -1) { notice_lang(s_OperServ, u, OPER_IGNORE_VALID_TIME); |
