summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cs_list.c4
-rw-r--r--src/core/os_akill.c2
-rw-r--r--src/core/os_news.c6
3 files changed, 5 insertions, 7 deletions
diff --git a/src/core/cs_list.c b/src/core/cs_list.c
index 68975cadf..93ffeffa5 100644
--- a/src/core/cs_list.c
+++ b/src/core/cs_list.c
@@ -36,9 +36,7 @@ public:
int count = 0, from = 0, to = 0, tofree = 0;
char *tmp = NULL;
char *s = NULL;
- bool forbidden, suspended, channoexpire;
-
- forbidden = suspended = noexpire = false;
+ bool forbidden = false, suspended = false, channoexpire = false;
if (!(!CSListOpersOnly || (is_oper(u))))
{
diff --git a/src/core/os_akill.c b/src/core/os_akill.c
index d7f2cddbd..32169e2d4 100644
--- a/src/core/os_akill.c
+++ b/src/core/os_akill.c
@@ -176,7 +176,7 @@ class CommandOSAKill : public Command
}
else
{
- if ((res = slist_indexof(&akills, (void *)mask)) == -1)
+ if ((res = slist_indexof(&akills, const_cast<void *>(static_cast<const void *>(mask)))) == -1) // XXX: possibly unsafe cast
{
notice_lang(s_OperServ, u, OPER_AKILL_NOT_FOUND, mask);
return MOD_CONT;
diff --git a/src/core/os_news.c b/src/core/os_news.c
index e06be7223..6720dd026 100644
--- a/src/core/os_news.c
+++ b/src/core/os_news.c
@@ -109,7 +109,7 @@ void load_news()
news = new NewsItem;
SAFE(read_int16(&type, f));
- news->type = (NewsType)type;
+ news->type = static_cast<NewsType>(type);
SAFE(read_int32(&news->num, f));
SAFE(read_string(&text, f));
news->Text = text;
@@ -219,7 +219,7 @@ static void DisplayNews(User *u, NewsType Type)
static int add_newsitem(User * u, const char *text, NewsType type)
{
int num = 0;
-
+
for (unsigned i = News.size(); i > 0; --i)
{
if (News[i - 1]->type == type)
@@ -228,7 +228,7 @@ static int add_newsitem(User * u, const char *text, NewsType type)
break;
}
}
-
+
NewsItem *news = new NewsItem;
news->type = type;
news->num = num + 1;