diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-08-19 23:13:30 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-08-19 23:13:30 +0000 |
| commit | 6ce5c90619491440fc68f011c372feaaaf9d66dc (patch) | |
| tree | 8e27c7a340a01d6c8cc13229369aabdb50a76d8b /src/core | |
| parent | 6c62e3968051283b73aa817966058906f28f289e (diff) | |
Add a few items to outstanding issues in TODO, clean up a lot of warnings (not all, some require more widespread changes than this), and fix a few potential bugs.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2457 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/cs_set.c | 3 | ||||
| -rw-r--r-- | src/core/cs_xop.c | 2 | ||||
| -rw-r--r-- | src/core/ns_alist.c | 2 | ||||
| -rw-r--r-- | src/core/ns_status.c | 2 | ||||
| -rw-r--r-- | src/core/os_news.c | 7 |
5 files changed, 7 insertions, 9 deletions
diff --git a/src/core/cs_set.c b/src/core/cs_set.c index 1e36e859e..00d18a110 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -460,10 +460,9 @@ class CommandCSSet : public Command { if (stricmp(param, "ON") == 0) { if (!(ci->flags & CI_XOP)) { - int i; ChanAccess *access; - for (i = 0; i < ci->access.size(); i++) { + for (unsigned i = 0; i < ci->access.size(); i++) { access = ci->GetAccess(i); if (!access->in_use) continue; diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index b83c44928..916792f8b 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -307,7 +307,7 @@ class XOPBase : public Command process_numlist(nick, NULL, xop_list_callback, u, ci, &sent_header, level, messages[XOP_LIST_HEADER]); else { - for (int i = 0; i < ci->access.size(); ++i) + for (unsigned i = 0; i < ci->access.size(); ++i) { ChanAccess *access = ci->GetAccess(i); if (nick && access->nc && !Anope::Match(access->nc->display, nick, false)) diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c index c4bfa04c7..26b975525 100644 --- a/src/core/ns_alist.c +++ b/src/core/ns_alist.c @@ -39,7 +39,7 @@ class CommandNSAList : public Command int min_level = 0; int is_servadmin = u->nc->IsServicesOper(); - int lev_param = 0; + unsigned lev_param = 0; if (!is_servadmin) /* Non service admins can only see their own levels */ diff --git a/src/core/ns_status.c b/src/core/ns_status.c index d2f89dcb9..551a5421f 100644 --- a/src/core/ns_status.c +++ b/src/core/ns_status.c @@ -27,7 +27,7 @@ class CommandNSStatus : public Command { User *u2; NickAlias *na = NULL; - int i = 0; + unsigned i = 0; const char *nick = params.size() ? params[0].c_str() : NULL; /* If no nickname is given, we assume that the user diff --git a/src/core/os_news.c b/src/core/os_news.c index 81b46526b..3100ffcc0 100644 --- a/src/core/os_news.c +++ b/src/core/os_news.c @@ -84,8 +84,7 @@ struct newsmsgs msgarray[] = { static int *findmsgs(int16 type, const char **type_name) { - int i; - for (i = 0; i < lenof(msgarray); i++) { + for (unsigned i = 0; i < lenof(msgarray); i++) { if (msgarray[i].type == type) { if (type_name) *type_name = msgarray[i].name; @@ -151,7 +150,7 @@ class NewsBase : public Command CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms, short type, int *msgs) { const char *text = params.size() > 1 ? params[1].c_str() : NULL; - int i, num; + int num; if (!text) this->OnSyntaxError(u); @@ -169,7 +168,7 @@ class NewsBase : public Command { notice_lang(s_OperServ, u, msgs[MSG_DELETED], num); /* Reset the order - #0000397 */ - for (i = 0; i < nnews; ++i) + for (int i = 0; i < nnews; ++i) { if (news[i].type == type && news[i].num > num) --news[i].num; |
