summaryrefslogtreecommitdiff
path: root/source3/popt/poptconfig.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-25 18:47:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:59 -0500
commit70faa40a2dc67344d530dec8d12186cdf177ee4a (patch)
tree8aae9ae02b5572e30c2e58205347412bb808c2c7 /source3/popt/poptconfig.c
parent5e066d5ee1b2e8d15a7af80313eb2b622a511b00 (diff)
downloadsamba-70faa40a2dc67344d530dec8d12186cdf177ee4a.tar.gz
samba-70faa40a2dc67344d530dec8d12186cdf177ee4a.tar.bz2
samba-70faa40a2dc67344d530dec8d12186cdf177ee4a.zip
r24048: Fix the C++ warnings in our version of popt
(This used to be commit fd3683c1b3d89a47d59643b0f5751726cb2c89f9)
Diffstat (limited to 'source3/popt/poptconfig.c')
-rw-r--r--source3/popt/poptconfig.c8
1 files changed, 4 insertions, 4 deletions
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);