diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/gtk/common/gtk-smb.c | 8 | ||||
-rw-r--r-- | source4/gtk/tools/gregedit.c | 2 | ||||
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 5 | ||||
-rw-r--r-- | source4/lib/registry/common/registry.h | 4 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c | 11 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c | 3 |
6 files changed, 9 insertions, 24 deletions
diff --git a/source4/gtk/common/gtk-smb.c b/source4/gtk/common/gtk-smb.c index 310b7a1b92..cc7013edc7 100644 --- a/source4/gtk/common/gtk-smb.c +++ b/source4/gtk/common/gtk-smb.c @@ -47,9 +47,9 @@ void gtk_show_ntstatus(GtkWidget *win, NTSTATUS status) static void on_browse_activate (GtkButton *button, gpointer user_data) { GtkRpcBindingDialog *rbd = user_data; - GtkSelectHostDialog *shd = gtk_select_host_dialog_new(TRUE); + GtkWidget *shd = gtk_select_host_dialog_new(TRUE); if(gtk_dialog_run(GTK_DIALOG(shd)) == GTK_RESPONSE_ACCEPT) { - gtk_entry_set_text(GTK_ENTRY(rbd->entry_host), gtk_select_host_dialog_get_host(shd)); + gtk_entry_set_text(GTK_ENTRY(rbd->entry_host), gtk_select_host_dialog_get_host(GTK_SELECT_HOST_DIALOG(shd))); } gtk_widget_destroy(GTK_WIDGET(shd)); @@ -61,8 +61,6 @@ static void gtk_rpc_binding_dialog_init (GtkRpcBindingDialog *gtk_rpc_binding_di GtkWidget *vbox1; GtkWidget *vbox6; GtkWidget *frame_transport; - GtkWidget *hbox2; - GtkWidget *lbl_transport; GtkWidget *label1; GtkWidget *frame_host; GtkWidget *hbox1; @@ -285,7 +283,6 @@ const char *gtk_rpc_binding_dialog_get_binding(GtkRpcBindingDialog *d, char *pip const char *transport; const char *host; char *options = NULL; - char *binding = NULL; /* Format: TRANSPORT:host:[\pipe\foo,foo,foo] */ @@ -318,7 +315,6 @@ GtkWidget *create_gtk_samba_about_dialog (char *appname) { GtkWidget *samba_about_dialog; GtkWidget *dialog_vbox1; - GtkWidget *image1; GtkWidget *label1; GtkWidget *label3; GtkWidget *label2; diff --git a/source4/gtk/tools/gregedit.c b/source4/gtk/tools/gregedit.c index 081028ee18..3297399b67 100644 --- a/source4/gtk/tools/gregedit.c +++ b/source4/gtk/tools/gregedit.c @@ -40,7 +40,6 @@ static void expand_key(GtkTreeView *treeview, GtkTreeIter *parent, GtkTreePath * GtkTreeIter firstiter, iter, tmpiter; REG_KEY *k, *sub; char *name; - GValue value; WERROR error; int i; @@ -330,7 +329,6 @@ static GtkWidget* create_mainwin (void) GtkWidget *tree_vals; GtkWidget *statusbar; GtkAccelGroup *accel_group; - GtkTreeIter iter, child; accel_group = gtk_accel_group_new (); diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index e7024d23fe..f0a6807558 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -30,9 +30,9 @@ static struct reg_init_function_entry *backends = NULL; static struct reg_init_function_entry *reg_find_backend_entry(const char *name); /* Register new backend */ -NTSTATUS registry_register(void *_function) +NTSTATUS registry_register(const void *_function) { - struct registry_ops *functions = _function; + const struct registry_ops *functions = _function; struct reg_init_function_entry *entry = backends; if (!functions || !functions->name) { @@ -97,7 +97,6 @@ WERROR reg_open(const char *backend, const char *location, const char *credentia struct reg_init_function_entry *entry; TALLOC_CTX *mem_ctx; REG_HANDLE *ret; - NTSTATUS status; WERROR werr; entry = reg_find_backend_entry(backend); diff --git a/source4/lib/registry/common/registry.h b/source4/lib/registry/common/registry.h index caa0e284bf..89d0ac6b14 100644 --- a/source4/lib/registry/common/registry.h +++ b/source4/lib/registry/common/registry.h @@ -123,7 +123,7 @@ struct registry_ops { }; struct reg_handle_s { - struct registry_ops *functions; + const struct registry_ops *functions; char *location; char *credentials; void *backend_data; @@ -132,7 +132,7 @@ struct reg_handle_s { struct reg_init_function_entry { /* Function to create a member of the pdb_methods list */ - struct registry_ops *functions; + const struct registry_ops *functions; struct reg_init_function_entry *prev, *next; }; diff --git a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c index 6945ebdb55..47cb60d711 100644 --- a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c +++ b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c @@ -89,15 +89,13 @@ static WERROR ldb_add_key(REG_KEY *p, const char *name, uint32_t access_mask, SE static WERROR ldb_fetch_subkeys(REG_KEY *k, int *count, REG_KEY ***subkeys) { struct ldb_context *c = k->handle->backend_data; - char *path; int ret, i, j; struct ldb_message **msg; - REG_KEY *key = NULL; ret = ldb_search(c, (char *)k->backend_data, LDB_SCOPE_ONELEVEL, "(key=*)", NULL,&msg); if(ret < 0) { - DEBUG(0, ("Error getting subkeys for '%s': %s\n", k->backend_data, ldb_errstring(c))); + DEBUG(0, ("Error getting subkeys for '%s': %s\n", (char *)k->backend_data, ldb_errstring(c))); return WERR_FOOBAR; } @@ -126,15 +124,13 @@ static WERROR ldb_fetch_subkeys(REG_KEY *k, int *count, REG_KEY ***subkeys) static WERROR ldb_fetch_values(REG_KEY *k, int *count, REG_VAL ***values) { struct ldb_context *c = k->handle->backend_data; - char *path; int ret, i, j; struct ldb_message **msg; - REG_KEY *key = NULL; ret = ldb_search(c, (char *)k->backend_data, LDB_SCOPE_ONELEVEL, "(value=*)", NULL,&msg); if(ret < 0) { - DEBUG(0, ("Error getting values for '%s': %s\n", k->backend_data, ldb_errstring(c))); + DEBUG(0, ("Error getting values for '%s': %s\n", (char *)k->backend_data, ldb_errstring(c))); return WERR_FOOBAR; } @@ -170,9 +166,8 @@ static WERROR ldb_get_hive(REG_HANDLE *h, int num, REG_KEY **key) static WERROR ldb_open_key(REG_HANDLE *h, int num, const char *name, REG_KEY **key) { struct ldb_context *c = h->backend_data; - char *path; struct ldb_message **msg; - char *ldap_path, *new_ldap_path; + char *ldap_path; int ret; TALLOC_CTX *mem_ctx = talloc_init("ldb_path"); if(num != 0) return WERR_NO_MORE_ITEMS; diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c index 4e6944a1e3..0d8d935a4a 100644 --- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c +++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c @@ -128,8 +128,6 @@ static WERROR rpc_close_registry(REG_HANDLE *h) static WERROR rpc_key_put_rpc_data(REG_KEY *k, struct rpc_key_data **data) { struct winreg_OpenKey r; - int i; - struct rpc_data *mydata = k->handle->backend_data; WERROR error; REG_KEY *hivekey; struct rpc_key_data *mykeydata; @@ -254,7 +252,6 @@ static WERROR rpc_get_subkey_by_index(REG_KEY *parent, int n, REG_KEY **subkey) struct winreg_EnumKeyNameRequest keyname; struct winreg_String classname; struct winreg_Time tm; - struct rpc_data *mydata = parent->handle->backend_data; struct rpc_key_data *mykeydata = parent->backend_data; WERROR error; NTSTATUS status; |