diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-08 13:27:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:41 -0500 |
commit | dccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch) | |
tree | 7c0f8e64f4ded3701818b8968171597eccd62267 /source4/scripting/ejs | |
parent | ffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff) | |
download | samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2 samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip |
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r-- | source4/scripting/ejs/ejsnet/net_ctx.c | 6 | ||||
-rw-r--r-- | source4/scripting/ejs/ejsnet/net_user.c | 14 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_auth.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_creds.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_ldb.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_param.c | 12 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_reg.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_samba3.c | 2 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_string.c | 4 |
9 files changed, 23 insertions, 23 deletions
diff --git a/source4/scripting/ejs/ejsnet/net_ctx.c b/source4/scripting/ejs/ejsnet/net_ctx.c index 411c98cc72..a2a3821082 100644 --- a/source4/scripting/ejs/ejsnet/net_ctx.c +++ b/source4/scripting/ejs/ejsnet/net_ctx.c @@ -78,7 +78,7 @@ static int ejs_net_context(MprVarHandle eid, int argc, struct MprVar **argv) get credential values from credentials object */ mprCreds = *(argv[0]); - creds = mprGetPtr(&mprCreds, "creds"); + creds = (struct cli_credentials *)mprGetPtr(&mprCreds, "creds"); if (creds == NULL) { ejsSetErrorMsg(eid, "invalid credentials parameter"); talloc_free(ctx); @@ -122,7 +122,7 @@ static int ejs_net_join_domain(MprVarHandle eid, int argc, struct MprVar **argv) struct libnet_context *ctx; struct libnet_Join *join; NTSTATUS status; - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); mem_ctx = talloc_new(mprMemCtx()); join = talloc(mem_ctx, struct libnet_Join); @@ -181,7 +181,7 @@ static int ejs_net_samsync_ldb(MprVarHandle eid, int argc, struct MprVar **argv) struct libnet_context *ctx; struct libnet_samsync_ldb *samsync; NTSTATUS status; - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); mem_ctx = talloc_new(mprMemCtx()); samsync = talloc(mem_ctx, struct libnet_samsync_ldb); diff --git a/source4/scripting/ejs/ejsnet/net_user.c b/source4/scripting/ejs/ejsnet/net_user.c index 8c9ab9f0eb..34524cc0fa 100644 --- a/source4/scripting/ejs/ejsnet/net_user.c +++ b/source4/scripting/ejs/ejsnet/net_user.c @@ -45,7 +45,7 @@ int ejs_net_userman(MprVarHandle eid, int argc, struct MprVar **argv) struct MprVar obj; /* libnet context */ - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); if (ctx == NULL) { ejsSetErrorMsg(eid, "ctx property returns null pointer"); return 0; @@ -128,14 +128,14 @@ static int ejs_net_createuser(MprVarHandle eid, int argc, char **argv) } /* libnet context */ - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); if (ctx == NULL) { ejsSetErrorMsg(eid, "ctx property returns null pointer"); goto done; } /* domain where the account is to be created */ - userman_domain = mprGetThisPtr(eid, "domain"); + userman_domain = (const char *)mprGetThisPtr(eid, "domain"); if (userman_domain == NULL) { ejsSetErrorMsg(eid, "domain property returns null pointer"); goto done; @@ -197,7 +197,7 @@ static int ejs_net_deleteuser(MprVarHandle eid, int argc, char **argv) } /* domain where the account is to be deleted */ - userman_domain = mprGetThisPtr(eid, "domain"); + userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain"); if (!userman_domain) { ejsSetErrorMsg(eid, "domain property returns null pointer"); goto done; @@ -253,14 +253,14 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv) } /* libnet context */ - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); if (ctx == NULL) { ejsSetErrorMsg(eid, "ctx property returns null pointer"); goto done; } /* domain where the user account is to be queried */ - userman_domain = mprGetThisPtr(eid, "domain"); + userman_domain = (struct libnet_context *)mprGetThisPtr(eid, "domain"); if (userman_domain == NULL) { ejsSetErrorMsg(eid, "domain property returns null pointer"); return -1; @@ -331,7 +331,7 @@ static int ejs_net_userlist(MprVarHandle eid, int argc, struct MprVar **argv) } /* libnet context */ - ctx = mprGetThisPtr(eid, "ctx"); + ctx = (struct libnet_context *)mprGetThisPtr(eid, "ctx"); if (ctx == NULL) { ejsSetErrorMsg(eid, "ctx property returns null pointer"); goto done; diff --git a/source4/scripting/ejs/smbcalls_auth.c b/source4/scripting/ejs/smbcalls_auth.c index 2624084f02..dcb0f73909 100644 --- a/source4/scripting/ejs/smbcalls_auth.c +++ b/source4/scripting/ejs/smbcalls_auth.c @@ -181,7 +181,7 @@ static int ejs_userAuth(MprVarHandle eid, int argc, struct MprVar **argv) return -1; } - remote_host = mprGetPtr(argv[1], "socket_address"); + remote_host = (struct socket_address *)mprGetPtr(argv[1], "socket_address"); if (remote_host == NULL) { ejsSetErrorMsg(eid, "userAuth requires a socket address second parameter"); return -1; diff --git a/source4/scripting/ejs/smbcalls_creds.c b/source4/scripting/ejs/smbcalls_creds.c index 0feead201e..b469f2c9fe 100644 --- a/source4/scripting/ejs/smbcalls_creds.c +++ b/source4/scripting/ejs/smbcalls_creds.c @@ -30,7 +30,7 @@ */ static struct cli_credentials *ejs_creds_get_credentials(int eid) { - struct cli_credentials *creds = mprGetThisPtr(eid, "creds"); + struct cli_credentials *creds = (struct cli_credentials *)mprGetThisPtr(eid, "creds"); if (creds == NULL) { ejsSetErrorMsg(eid, "NULL ejs credentials"); } diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c index 7b143ae4d9..1e55d1c563 100644 --- a/source4/scripting/ejs/smbcalls_ldb.c +++ b/source4/scripting/ejs/smbcalls_ldb.c @@ -34,7 +34,7 @@ */ static struct ldb_context *ejs_get_ldb_context(int eid) { - struct ldb_context *ldb = mprGetThisPtr(eid, "db"); + struct ldb_context *ldb = (struct ldb_context *)mprGetThisPtr(eid, "db"); if (ldb == NULL) { ejsSetErrorMsg(eid, "invalid ldb connection"); } diff --git a/source4/scripting/ejs/smbcalls_param.c b/source4/scripting/ejs/smbcalls_param.c index 0e7a83457a..9dfad39ee7 100644 --- a/source4/scripting/ejs/smbcalls_param.c +++ b/source4/scripting/ejs/smbcalls_param.c @@ -39,7 +39,7 @@ static int ejs_param_get(MprVarHandle eid, int argc, char **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); if (argc == 2) { @@ -72,7 +72,7 @@ static int ejs_param_get_list(MprVarHandle eid, int argc, char **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); if (argc == 2) { @@ -107,7 +107,7 @@ static int ejs_param_set(MprVarHandle eid, int argc, struct MprVar **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); @@ -148,7 +148,7 @@ static int ejs_param_data(MprVarHandle eid, int argc, char **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); ret = mprObject("array"); @@ -184,7 +184,7 @@ static int ejs_param_load(MprVarHandle eid, int argc, char **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); ret = param_read(ctx, argv[0]); @@ -209,7 +209,7 @@ static int ejs_param_save(MprVarHandle eid, int argc, char **argv) return -1; } - ctx = mprGetThisPtr(eid, "param"); + ctx = (struct param_context *)mprGetThisPtr(eid, "param"); mprAssert(ctx); ret = param_write(ctx, argv[0]); diff --git a/source4/scripting/ejs/smbcalls_reg.c b/source4/scripting/ejs/smbcalls_reg.c index 4d84587fa4..d4b13cc2ca 100644 --- a/source4/scripting/ejs/smbcalls_reg.c +++ b/source4/scripting/ejs/smbcalls_reg.c @@ -32,7 +32,7 @@ */ static struct registry_context *ejs_get_reg_context(int eid) { - struct registry_context *rctx = mprGetThisPtr(eid, "registry"); + struct registry_context *rctx = (struct registry_context *)mprGetThisPtr(eid, "registry"); if (rctx == NULL) { ejsSetErrorMsg(eid, "unable to find registry"); } diff --git a/source4/scripting/ejs/smbcalls_samba3.c b/source4/scripting/ejs/smbcalls_samba3.c index 3c550e57cd..7c9ef50cf5 100644 --- a/source4/scripting/ejs/smbcalls_samba3.c +++ b/source4/scripting/ejs/smbcalls_samba3.c @@ -433,7 +433,7 @@ static int ejs_find_domainsecrets(MprVarHandle eid, int argc, struct MprVar **ar return -1; } - samba3 = mprGetThisPtr(eid, "samba3"); + samba3 = (struct samba3 *)mprGetThisPtr(eid, "samba3"); mprAssert(samba3); sec = samba3_find_domainsecrets(samba3, mprToString(argv[0])); diff --git a/source4/scripting/ejs/smbcalls_string.c b/source4/scripting/ejs/smbcalls_string.c index b83178dbba..215ce77b77 100644 --- a/source4/scripting/ejs/smbcalls_string.c +++ b/source4/scripting/ejs/smbcalls_string.c @@ -437,7 +437,7 @@ static int ejs_encodeURIComponent(MprVarHandle eid, int argc, char **argv) if (!isalnum(s[i])) count++; } - ret = talloc_size(mprMemCtx(), i + count*2 + 1); + ret = talloc_array(mprMemCtx(), char, i + count*2 + 1); if (ret == NULL) { return -1; } @@ -470,7 +470,7 @@ static int ejs_decodeURIComponent(MprVarHandle eid, int argc, char **argv) s = argv[0]; - ret = talloc_size(mprMemCtx(), strlen(s) + 1); + ret = talloc_array(mprMemCtx(), char, strlen(s) + 1); if (ret == NULL) { return -1; } |