mirror of
https://github.com/samba-team/samba.git
synced 2025-11-13 08:23:49 +03:00
r25000: Fix some more C++ compatibility warnings.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
0a3b53fd2c
commit
08bb1ef643
@@ -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");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user