summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-07 15:08:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:27 -0500
commitcd962355abad90a2161765a7be7d26e63572cab7 (patch)
tree21a1e180cfa6396c491301e3e171d8105208bb44 /source4/scripting/ejs
parent6c79213eb80283bb211d2e2161c25337c0a549b7 (diff)
downloadsamba-cd962355abad90a2161765a7be7d26e63572cab7.tar.gz
samba-cd962355abad90a2161765a7be7d26e63572cab7.tar.bz2
samba-cd962355abad90a2161765a7be7d26e63572cab7.zip
r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/smbcalls_cli.c12
-rw-r--r--source4/scripting/ejs/smbcalls_rpc.c5
2 files changed, 9 insertions, 8 deletions
diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c
index e94207bf36..fc26fddfd5 100644
--- a/source4/scripting/ejs/smbcalls_cli.c
+++ b/source4/scripting/ejs/smbcalls_cli.c
@@ -483,7 +483,7 @@ static int ejs_tree_disconnect(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = talloc_check_name(argv[0]->ptr, "struct smbcli_tree");
+ tree = talloc_get_type(argv[0]->ptr, struct smbcli_tree);
result = smb_tree_disconnect(tree);
@@ -512,7 +512,7 @@ static int ejs_mkdir(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = argv[0]->ptr;
+ tree = (struct smbcli_tree *)argv[0]->ptr;
if (!mprVarIsString(argv[1]->type)) {
ejsSetErrorMsg(eid, "arg 2 must be a string");
@@ -546,7 +546,7 @@ static int ejs_rmdir(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = argv[0]->ptr;
+ tree = (struct smbcli_tree *)argv[0]->ptr;
if (!mprVarIsString(argv[1]->type)) {
ejsSetErrorMsg(eid, "arg 2 must be a string");
@@ -580,7 +580,7 @@ static int ejs_rename(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = argv[0]->ptr;
+ tree = (struct smbcli_tree *)argv[0]->ptr;
if (!mprVarIsString(argv[1]->type)) {
ejsSetErrorMsg(eid, "arg 2 must be a string");
@@ -619,7 +619,7 @@ static int ejs_unlink(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = argv[0]->ptr;
+ tree = (struct smbcli_tree *)argv[0]->ptr;
if (!mprVarIsString(argv[1]->type)) {
ejsSetErrorMsg(eid, "arg 2 must be a string");
@@ -666,7 +666,7 @@ static int ejs_list(MprVarHandle eid, int argc, MprVar **argv)
return -1;
}
- tree = argv[0]->ptr;
+ tree = (struct smbcli_tree *)argv[0]->ptr;
if (!mprVarIsString(argv[1]->type)) {
ejsSetErrorMsg(eid, "arg 2 must be a string");
diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c
index 4addd473da..b95681d4ef 100644
--- a/source4/scripting/ejs/smbcalls_rpc.c
+++ b/source4/scripting/ejs/smbcalls_rpc.c
@@ -144,7 +144,8 @@ static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
credentials = mprGetProperty(this, "credentials", NULL);
if (credentials) {
- creds = mprGetPtr(credentials, "creds");
+ creds = (struct cli_credentials *)
+ mprGetPtr(credentials, "creds");
} else {
creds = cmdline_credentials;
}
@@ -188,7 +189,7 @@ static int ejs_irpc_call(int eid, struct MprVar *io,
int i, count;
struct MprVar *results;
- p = mprGetThisPtr(eid, "irpc");
+ p = (struct ejs_irpc_connection *)mprGetThisPtr(eid, "irpc");
ejs = talloc(mprMemCtx(), struct ejs_rpc);
if (ejs == NULL) {