From 616c45f16a56527f54d428a7fbeabcc9952459f5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Aug 2007 18:56:46 +0000 Subject: r24718: Fix some compiler warnings. (This used to be commit 08f7389ab7312d350e056b1ba98da86d80944424) --- source4/lib/registry/rpc.c | 17 +++++++++++++---- source4/lib/registry/tests/diff.c | 4 +--- source4/lib/registry/tests/registry.c | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index 59d41d591a..e4157fe424 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -90,7 +90,7 @@ static struct { static WERROR rpc_query_key(const struct registry_key *k); -static WERROR rpc_get_predefined_key(struct registry_context *ctx, +static WERROR rpc_get_predefined_key(const struct registry_context *ctx, uint32_t hkey_type, struct registry_key **k) { @@ -336,7 +336,8 @@ static WERROR rpc_del_key(struct registry_key *parent, const char *name) static WERROR rpc_get_info(TALLOC_CTX *mem_ctx, const struct registry_key *key, const char **classname, uint32_t *numsubkeys, - uint32_t *numvalue) + uint32_t *numvalue, + NTTIME *last_changed_time) { struct rpc_key *mykeydata = talloc_get_type(key, struct rpc_key); WERROR error; @@ -347,8 +348,14 @@ static WERROR rpc_get_info(TALLOC_CTX *mem_ctx, const struct registry_key *key, } /* FIXME: *classname = talloc_strdup(mem_ctx, mykeydata->classname); */ - *numvalue = mykeydata->num_values; - *numsubkeys = mykeydata->num_subkeys; + /* FIXME: *last_changed_time = mykeydata->last_changed_time */ + + if (numvalue != NULL) + *numvalue = mykeydata->num_values; + + if (numsubkeys != NULL) + *numsubkeys = mykeydata->num_subkeys; + return WERR_OK; } @@ -360,6 +367,7 @@ static struct registry_operations reg_backend_rpc = { .create_key = rpc_add_key, .delete_key = rpc_del_key, .get_key_info = rpc_get_info, + .get_predefined_key = rpc_get_predefined_key, }; _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, @@ -394,6 +402,7 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, } *ctx = (struct registry_context *)rctx; + (*ctx)->ops = ®_backend_rpc; return WERR_OK; } diff --git a/source4/lib/registry/tests/diff.c b/source4/lib/registry/tests/diff.c index 220da88601..99a4589309 100644 --- a/source4/lib/registry/tests/diff.c +++ b/source4/lib/registry/tests/diff.c @@ -45,9 +45,7 @@ static bool test_diff_load(struct torture_context *test) static bool test_diff_apply(struct torture_context *test) { - /* -_PUBLIC_ WERROR reg_diff_apply (const char *filename, struct registry_context *ctx) - */ + /* _PUBLIC_ WERROR reg_diff_apply (const char *filename, struct registry_context *ctx) */ return true; } diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c index 2aab034ff3..dfc8e09d57 100644 --- a/source4/lib/registry/tests/registry.c +++ b/source4/lib/registry/tests/registry.c @@ -87,7 +87,7 @@ static bool test_predef_key_by_name_invalid(struct torture_context *tctx, struct registry_key *root; WERROR error; - error = reg_get_predefined_key_by_name(tctx, "BLA", &root); + error = reg_get_predefined_key_by_name(rctx, "BLA", &root); torture_assert_werr_equal(tctx, error, WERR_BADFILE, "getting predefined key failed"); return true; -- cgit