From 70faa40a2dc67344d530dec8d12186cdf177ee4a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 25 Jul 2007 18:47:40 +0000 Subject: r24048: Fix the C++ warnings in our version of popt (This used to be commit fd3683c1b3d89a47d59643b0f5751726cb2c89f9) --- source3/popt/poptconfig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/popt/poptconfig.c') diff --git a/source3/popt/poptconfig.c b/source3/popt/poptconfig.c index 5941c2b704..837828ccf9 100644 --- a/source3/popt/poptconfig.c +++ b/source3/popt/poptconfig.c @@ -18,7 +18,7 @@ static void configLine(poptContext con, char * line) /*@=type@*/ const char * entryType; const char * opt; - poptItem item = alloca(sizeof(*item)); + poptItem item = (poptItem)alloca(sizeof(*item)); int i, j; /*@-boundswrite@*/ @@ -114,7 +114,7 @@ int poptReadConfigFile(poptContext con, const char * fn) return POPT_ERROR_ERRNO; } - file = alloca(fileLength + 1); + file = (const char *)alloca(fileLength + 1); if (read(fd, (char *)file, fileLength) != fileLength) { rc = errno; (void) close(fd); @@ -127,7 +127,7 @@ int poptReadConfigFile(poptContext con, const char * fn) return POPT_ERROR_ERRNO; /*@-boundswrite@*/ - dst = buf = alloca(fileLength + 1); + dst = buf = (char *)alloca(fileLength + 1); chptr = file; end = (file + fileLength); @@ -179,7 +179,7 @@ int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv) #endif if ((home = getenv("HOME"))) { - fn = alloca(strlen(home) + 20); + fn = (char *)alloca(strlen(home) + 20); strcpy(fn, home); strcat(fn, "/.popt"); rc = poptReadConfigFile(con, fn); -- cgit