From e3adfa41917b7708b1e9b498b4c3a8fd46fd1530 Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Tue, 30 Sep 2008 18:45:08 +0000 Subject: Make a bunch of stuff build under g++. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1171 5417fbe8-f217-4b02-8779-1006273d7864 --- lang/langcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lang/langcomp.c') diff --git a/lang/langcomp.c b/lang/langcomp.c index bd9bf2646..d9c40f8fb 100644 --- a/lang/langcomp.c +++ b/lang/langcomp.c @@ -76,11 +76,11 @@ int read_index_file() } while (fgets(buf, sizeof(buf), f)) numstrings++; - if (!(stringnames = calloc(sizeof(char *), numstrings))) { + if (!(stringnames = (char **)calloc(sizeof(char *), numstrings))) { perror("calloc(stringnames)"); return -1; } - if (!(strings = calloc(sizeof(char *), numstrings))) { + if (!(strings = (char **)calloc(sizeof(char *), numstrings))) { perror("calloc(strings)"); return -1; } @@ -215,7 +215,7 @@ int main(int ac, char **av) line++; i = strings[curstring] ? strlen(strings[curstring]) : 0; if (!(strings[curstring] = - realloc(strings[curstring], i+strlen(line)+2))) { + (char *)realloc(strings[curstring], i+strlen(line)+2))) { fprintf(stderr, "%s:%d: Out of memory!\n",filename,linenum); return 2; } @@ -234,7 +234,7 @@ int main(int ac, char **av) retval = 1; maxerr--; } else { - if (!(strings[curstring] = malloc(1))) { + if (!(strings[curstring] = (char *)malloc(1))) { fprintf(stderr, "%s:%d: Out of memory!\n",filename,linenum); return 2; } -- cgit