diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-07 13:31:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:26 -0500 |
commit | 6cf69fee189857ae6f85cd3f81a6a58364839942 (patch) | |
tree | 06d80ff7f9c730a0ae70526f94d88acea800eccd /source4/lib | |
parent | bd5a802a26f427779663a3de5f6d49f352b7c473 (diff) | |
download | samba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.gz samba-6cf69fee189857ae6f85cd3f81a6a58364839942.tar.bz2 samba-6cf69fee189857ae6f85cd3f81a6a58364839942.zip |
r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/local.c | 4 | ||||
-rw-r--r-- | source4/lib/registry/patchfile.c | 14 | ||||
-rw-r--r-- | source4/lib/registry/patchfile_dotreg.c | 11 | ||||
-rw-r--r-- | source4/lib/registry/patchfile_preg.c | 12 | ||||
-rw-r--r-- | source4/lib/registry/samba.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/tools/common.c | 1 |
6 files changed, 23 insertions, 21 deletions
diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c index aefb11bde2..8ccb96cbdc 100644 --- a/source4/lib/registry/local.c +++ b/source4/lib/registry/local.c @@ -146,7 +146,7 @@ WERROR local_get_predefined_key (const struct registry_context *ctx, return WERR_OK; } -WERROR local_enum_key(TALLOC_CTX *mem_ctx, +static WERROR local_enum_key(TALLOC_CTX *mem_ctx, const struct registry_key *key, uint32_t idx, const char **name, const char **keyclass, @@ -169,7 +169,7 @@ static WERROR local_create_key (TALLOC_CTX *mem_ctx, struct hive_key *hivekey; const char **elements; int i; - char *last_part; + const char *last_part; last_part = strrchr(name, '\\'); if (last_part == NULL) { diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c index 8df873d56b..99887c67bf 100644 --- a/source4/lib/registry/patchfile.c +++ b/source4/lib/registry/patchfile.c @@ -253,8 +253,8 @@ _PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1, * Load diff file */ _PUBLIC_ WERROR reg_diff_load(const char *filename, - const struct reg_diff_callbacks *callbacks, - void *callback_data) + const struct reg_diff_callbacks *callbacks, + void *callback_data) { int fd; char hdr[4]; @@ -295,7 +295,7 @@ _PUBLIC_ WERROR reg_diff_load(const char *filename, */ static WERROR reg_diff_apply_add_key(void *_ctx, const char *key_name) { - struct registry_context *ctx = _ctx; + struct registry_context *ctx = (struct registry_context *)_ctx; struct registry_key *tmp; WERROR error; @@ -310,7 +310,7 @@ static WERROR reg_diff_apply_add_key(void *_ctx, const char *key_name) static WERROR reg_diff_apply_del_key(void *_ctx, const char *key_name) { - struct registry_context *ctx = _ctx; + struct registry_context *ctx = (struct registry_context *)_ctx; WERROR error; error = reg_key_del_abs(ctx, key_name); @@ -325,7 +325,7 @@ static WERROR reg_diff_apply_del_key(void *_ctx, const char *key_name) static WERROR reg_diff_apply_set_value(void *_ctx, const char *path, const char *value_name, uint32_t value_type, DATA_BLOB value) { - struct registry_context *ctx = _ctx; + struct registry_context *ctx = (struct registry_context *)_ctx; struct registry_key *tmp; WERROR error; @@ -350,7 +350,7 @@ static WERROR reg_diff_apply_set_value(void *_ctx, const char *path, const char static WERROR reg_diff_apply_del_value (void *_ctx, const char *key_name, const char *value_name) { - struct registry_context *ctx = _ctx; + struct registry_context *ctx = (struct registry_context *)_ctx; struct registry_key *tmp; WERROR error; @@ -374,7 +374,7 @@ static WERROR reg_diff_apply_del_value (void *_ctx, const char *key_name, const static WERROR reg_diff_apply_del_all_values(void *_ctx, const char *key_name) { - struct registry_context *ctx = _ctx; + struct registry_context *ctx = (struct registry_context *)_ctx; struct registry_key *key; WERROR error; int i; diff --git a/source4/lib/registry/patchfile_dotreg.c b/source4/lib/registry/patchfile_dotreg.c index 1b4bffe819..32b70d2144 100644 --- a/source4/lib/registry/patchfile_dotreg.c +++ b/source4/lib/registry/patchfile_dotreg.c @@ -40,7 +40,7 @@ struct dotreg_data { static WERROR reg_dotreg_diff_add_key(void *_data, const char *key_name) { - struct dotreg_data *data = _data; + struct dotreg_data *data = (struct dotreg_data *)_data; fdprintf(data->fd, "\n[%s]\n", key_name); @@ -49,7 +49,7 @@ static WERROR reg_dotreg_diff_add_key(void *_data, const char *key_name) static WERROR reg_dotreg_diff_del_key(void *_data, const char *key_name) { - struct dotreg_data *data = _data; + struct dotreg_data *data = (struct dotreg_data *)_data; fdprintf(data->fd, "\n[-%s]\n", key_name); @@ -59,7 +59,7 @@ static WERROR reg_dotreg_diff_del_key(void *_data, const char *key_name) static WERROR reg_dotreg_diff_set_value(void *_data, const char *path, const char *value_name, uint32_t value_type, DATA_BLOB value) { - struct dotreg_data *data = _data; + struct dotreg_data *data = (struct dotreg_data *)_data; fdprintf(data->fd, "\"%s\"=%s:%s\n", value_name, str_regtype(value_type), @@ -70,7 +70,7 @@ static WERROR reg_dotreg_diff_set_value(void *_data, const char *path, static WERROR reg_dotreg_diff_del_value(void *_data, const char *path, const char *value_name) { - struct dotreg_data *data = _data; + struct dotreg_data *data = (struct dotreg_data *)_data; fdprintf(data->fd, "\"%s\"=-\n", value_name); @@ -130,7 +130,8 @@ _PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename, /** * Load diff file */ -_PUBLIC_ WERROR reg_dotreg_diff_load(int fd, const struct reg_diff_callbacks *callbacks, void *callback_data) +_PUBLIC_ WERROR reg_dotreg_diff_load(int fd, + const struct reg_diff_callbacks *callbacks, void *callback_data) { char *line, *p, *q; char *curkey = NULL; diff --git a/source4/lib/registry/patchfile_preg.c b/source4/lib/registry/patchfile_preg.c index 1c8d76538a..993de19f98 100644 --- a/source4/lib/registry/patchfile_preg.c +++ b/source4/lib/registry/patchfile_preg.c @@ -42,37 +42,37 @@ static WERROR preg_read_utf16(int fd, char *c) /* FIXME These functions need to be implemented */ static WERROR reg_preg_diff_add_key(void *_data, const char *key_name) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; return WERR_OK; } static WERROR reg_preg_diff_del_key(void *_data, const char *key_name) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; return WERR_OK; } static WERROR reg_preg_diff_set_value(void *_data, const char *key_name, const char *value_name, uint32_t value_type, DATA_BLOB value_data) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; return WERR_OK; } static WERROR reg_preg_diff_del_value(void *_data, const char *key_name, const char *value_name) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; return WERR_OK; } static WERROR reg_preg_diff_del_all_values(void *_data, const char *key_name) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; return WERR_OK; } static WERROR reg_preg_diff_done(void *_data) { - struct preg_data *data = _data; + struct preg_data *data = (struct preg_data *)_data; close(data->fd); talloc_free(data); diff --git a/source4/lib/registry/samba.c b/source4/lib/registry/samba.c index 6aaaa118d0..a5d6f76459 100644 --- a/source4/lib/registry/samba.c +++ b/source4/lib/registry/samba.c @@ -24,7 +24,7 @@ * @brief Samba-specific registry functions */ -WERROR mount_samba_hive(struct registry_context *ctx, +static WERROR mount_samba_hive(struct registry_context *ctx, struct auth_session_info *auth_info, struct cli_credentials *creds, const char *name, diff --git a/source4/lib/registry/tools/common.c b/source4/lib/registry/tools/common.c index c8b0945c2c..aa11eccbee 100644 --- a/source4/lib/registry/tools/common.c +++ b/source4/lib/registry/tools/common.c @@ -21,6 +21,7 @@ #include "includes.h" #include "auth/credentials/credentials.h" #include "lib/registry/registry.h" +#include "lib/registry/tools/common.h" struct registry_context *reg_common_open_remote(const char *remote, struct cli_credentials *creds) { |