summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c18
-rw-r--r--src/memoserv.c4
-rw-r--r--src/messages.c4
3 files changed, 13 insertions, 13 deletions
diff --git a/src/main.c b/src/main.c
index e2927b283..320438054 100644
--- a/src/main.c
+++ b/src/main.c
@@ -354,8 +354,7 @@ void sighandler(int signum)
save_databases();
if (!read_config(1)) {
- sprintf(quitmsg,
- "Error Reading Configuration File (Received SIGUSR2)");
+ quitmsg = "Error Reading Configuration File (Received SIGUSR2)";
quitting = 1;
}
send_event(EVENT_RELOAD, 1, EVENT_START);
@@ -480,15 +479,15 @@ void sighandler(int signum)
#ifndef _WIN32
signum == SIGUSR1 ||
#endif
- !(quitmsg = calloc(BUFSIZE, 1))) {
+ !(quitmsg = (const char *)calloc(BUFSIZE, 1))) {
quitmsg = "Out of memory!";
} else {
+
+ // Yes, this isn't the "nicest" of ideas, but we know it's safe, if bad practice. -- w00t
#if HAVE_STRSIGNAL
- snprintf(quitmsg, BUFSIZE, "Services terminating: %s",
- strsignal(signum));
+ snprintf((char *)quitmsg, BUFSIZE, "Services terminating: %s", strsignal(signum));
#else
- snprintf(quitmsg, BUFSIZE, "Services terminating on signal %d",
- signum);
+ snprintf((char *)quitmsg, BUFSIZE, "Services terminating on signal %d", signum);
#endif
}
@@ -656,9 +655,10 @@ int main(int ac, char **av, char **envp)
process();
} else if (i == 0) {
int errno_save = errno;
- quitmsg = scalloc(BUFSIZE, 1);
+ quitmsg = (const char *)scalloc(BUFSIZE, 1);
if (quitmsg) {
- snprintf(quitmsg, BUFSIZE,
+ // Naughty, but oh well. :)
+ snprintf((char *)quitmsg, BUFSIZE,
"Read error from server: %s (error num: %d)",
strerror(errno_save), errno_save);
} else {
diff --git a/src/memoserv.c b/src/memoserv.c
index c55f9633f..d0c48a4e7 100644
--- a/src/memoserv.c
+++ b/src/memoserv.c
@@ -256,7 +256,7 @@ void memo_send(User * u, char *name, char *text, int z)
} else {
u->lastmemosend = now;
mi->memocount++;
- mi->memos = srealloc(mi->memos, sizeof(Memo) * mi->memocount);
+ mi->memos = (Memo *)srealloc(mi->memos, sizeof(Memo) * mi->memocount);
m = &mi->memos[mi->memocount - 1];
strscpy(m->sender, source, NICKMAX);
m->moduleData = NULL;
@@ -293,7 +293,7 @@ void memo_send(User * u, char *name, char *text, int z)
int i;
for (i = 0; i < nc->aliases.count; i++) {
- na = nc->aliases.list[i];
+ na = (NickAlias *)nc->aliases.list[i];
if (na->u && nick_identified(na->u))
notice_lang(s_MemoServ, na->u,
MEMO_NEW_MEMO_ARRIVED, source,
diff --git a/src/messages.c b/src/messages.c
index 1ac41b456..627fdfe03 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -281,10 +281,10 @@ int m_stats(char *source, int ac, char **av)
for (i = 0; i < RootNumber; i++)
anope_cmd_243("%s O * * %s Root 0", source,
ServicesRoots[i]);
- for (i = 0; i < servadmins.count && (nc = servadmins.list[i]);
+ for (i = 0; i < servadmins.count && (nc = (NickCore *)servadmins.list[i]);
i++)
anope_cmd_243("%s O * * %s Admin 0", source, nc->display);
- for (i = 0; i < servopers.count && (nc = servopers.list[i]);
+ for (i = 0; i < servopers.count && (nc = (NickCore *)servopers.list[i]);
i++)
anope_cmd_243("%s O * * %s Oper 0", source, nc->display);