diff options
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r-- | source4/scripting/ejs/mprutil.c | 6 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_cli.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_data.c | 6 |
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; |