summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-02-27 10:23:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:07 -0500
commit760f5b4b39718e317e6a8f418e0ed156827ee0b1 (patch)
treec942954973f6ffec4d95e7c659c05995b33718c1 /source4/scripting/ejs
parentd5beaae0b82e7877c657c308b2969824cdc27fd1 (diff)
downloadsamba-760f5b4b39718e317e6a8f418e0ed156827ee0b1.tar.gz
samba-760f5b4b39718e317e6a8f418e0ed156827ee0b1.tar.bz2
samba-760f5b4b39718e317e6a8f418e0ed156827ee0b1.zip
r13710: fix compiler warnings
metze (This used to be commit 6ee7de9bbf6ff55221fc8e3a6f467e69e564e2e1)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/mprutil.c6
-rw-r--r--source4/scripting/ejs/smbcalls_cli.c2
-rw-r--r--source4/scripting/ejs/smbcalls_data.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/source4/scripting/ejs/mprutil.c b/source4/scripting/ejs/mprutil.c
index 91683db6bd..d8c44c2450 100644
--- a/source4/scripting/ejs/mprutil.c
+++ b/source4/scripting/ejs/mprutil.c
@@ -143,7 +143,7 @@ struct MprVar mprString(const char *s)
struct MprVar mprData(const uint8_t *p, size_t length)
{
struct MprVar var;
- char *s = talloc_strndup(mprMemCtx(), p, length);
+ char *s = talloc_strndup(mprMemCtx(), (const char *)p, length);
if (s == NULL) {
return mprCreateUndefinedVar();
}
@@ -229,7 +229,7 @@ struct MprVar mprLdbArray(struct ldb_context *ldb,
/*
turn a MprVar string variable into a const char *
*/
-const char *mprToString(const struct MprVar *v)
+const char *mprToString(struct MprVar *v)
{
if (v->trigger) {
mprReadProperty(v, 0);
@@ -241,7 +241,7 @@ const char *mprToString(const struct MprVar *v)
/*
turn a MprVar integer variable into an int
*/
-int mprToInt(const struct MprVar *v)
+int mprToInt(struct MprVar *v)
{
if (v->trigger) {
mprReadProperty(v, 0);
diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c
index e165222a98..bc69c0653d 100644
--- a/source4/scripting/ejs/smbcalls_cli.c
+++ b/source4/scripting/ejs/smbcalls_cli.c
@@ -413,7 +413,7 @@ static int ejs_tree_connect(MprVarHandle eid, int argc, char **argv)
struct cli_credentials *creds;
struct smb_composite_connect io;
struct smbcli_tree *tree;
- const char *hostname, *sharename;
+ char *hostname, *sharename;
NTSTATUS result;
TALLOC_CTX *mem_ctx;
diff --git a/source4/scripting/ejs/smbcalls_data.c b/source4/scripting/ejs/smbcalls_data.c
index 54e496ea57..a1686a71e1 100644
--- a/source4/scripting/ejs/smbcalls_data.c
+++ b/source4/scripting/ejs/smbcalls_data.c
@@ -179,7 +179,7 @@ static int ejs_regToVar(MprVarHandle eid, int argc, struct MprVar **argv)
char *s;
ssize_t len;
len = convert_string_talloc(mprMemCtx(), CH_UTF16, CH_UNIX,
- blob->data, blob->length, &s);
+ blob->data, blob->length, (void **)&s);
if (len == -1) {
ejsSetErrorMsg(eid, "regToVar invalid REG_SZ string");
return -1;
@@ -218,7 +218,7 @@ static int ejs_regToVar(MprVarHandle eid, int argc, struct MprVar **argv)
case REG_MULTI_SZ: {
DATA_BLOB b = *blob;
- char **list = NULL;
+ const char **list = NULL;
while (b.length > 0) {
char *s;
ssize_t len;
@@ -227,7 +227,7 @@ static int ejs_regToVar(MprVarHandle eid, int argc, struct MprVar **argv)
break;
}
len = convert_string_talloc(mprMemCtx(), CH_UTF16, CH_UNIX,
- b.data, slen, &s);
+ b.data, slen, (void **)&s);
if (len == -1) {
ejsSetErrorMsg(eid, "regToVar invalid REG_MULTI_SZ string");
return -1;