Author: jelmer
Date: 2007-09-07 15:35:18 +0000 (Fri, 07 Sep 2007)
New Revision: 25001

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25001

Log:
Fix more C++ and other warnings, fix some of the indentation with ts=4 lines 
that I accidently added earlier.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c
   branches/SAMBA_4_0/source/client/client.c
   branches/SAMBA_4_0/source/client/smbmount.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
   branches/SAMBA_4_0/source/kdc/kdc.c
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c
   branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c
   branches/SAMBA_4_0/source/lib/socket/connect_multi.c
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c
   branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c
   branches/SAMBA_4_0/source/libcli/raw/raweas.c
   branches/SAMBA_4_0/source/libcli/raw/rawlpq.c
   branches/SAMBA_4_0/source/libcli/raw/smb_signing.c
   branches/SAMBA_4_0/source/libcli/resolve/resolve.c
   branches/SAMBA_4_0/source/libcli/resolve/wins.c
   branches/SAMBA_4_0/source/libnet/libnet_samdump.c
   branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
   branches/SAMBA_4_0/source/nbt_server/wins/wins_hook.c
   branches/SAMBA_4_0/source/winbind/wb_samba3_protocol.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c
===================================================================
--- branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c       2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c       2007-09-07 
15:35:18 UTC (rev 25001)
@@ -1229,7 +1229,9 @@
                return NT_STATUS_FOOBAR;
        }
 
-       principal_string = talloc_strndup(mem_ctx, name_token.value, 
name_token.length);
+       principal_string = talloc_strndup(mem_ctx, 
+                                         (const char *)name_token.value, 
+                                         name_token.length);
 
        gss_release_buffer(&min_stat, &name_token);
 

Modified: branches/SAMBA_4_0/source/client/client.c
===================================================================
--- branches/SAMBA_4_0/source/client/client.c   2007-09-07 15:08:14 UTC (rev 
25000)
+++ branches/SAMBA_4_0/source/client/client.c   2007-09-07 15:35:18 UTC (rev 
25001)
@@ -3045,10 +3045,10 @@
 /****************************************************************************
 handle a -L query
 ****************************************************************************/
-static int do_host_query(const char *query_host)
+static int do_host_query(const char *query_host, const char *workgroup)
 {
        browse_host(query_host);
-       list_servers(lp_workgroup());
+       list_servers(workgroup);
        return(0);
 }
 
@@ -3209,7 +3209,7 @@
        }
   
        if (query_host) {
-               return do_host_query(query_host);
+               return do_host_query(query_host, lp_workgroup());
        }
 
        if (message) {

Modified: branches/SAMBA_4_0/source/client/smbmount.c
===================================================================
--- branches/SAMBA_4_0/source/client/smbmount.c 2007-09-07 15:08:14 UTC (rev 
25000)
+++ branches/SAMBA_4_0/source/client/smbmount.c 2007-09-07 15:35:18 UTC (rev 
25001)
@@ -911,7 +911,7 @@
        DEBUG(3,("mount.smbfs started (version %s)\n", VERSION));
 
        if (*workgroup == 0) {
-               pstrcpy(workgroup,lp_workgroup());
+               pstrcpy(workgroup, lp_workgroup());
        }
 
        if (!*my_netbios_name) {

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c    
2007-09-07 15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c    
2007-09-07 15:35:18 UTC (rev 25001)
@@ -340,18 +340,18 @@
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-if (lp_parm_bool(-1, "password_hash", "create_aes_key", false)) {
-/*
- * TODO:
- *
- * w2k and w2k3 doesn't support AES, so we'll not include
- * the AES key here yet.
- *
- * Also we don't have an example supplementalCredentials blob
- * from Windows Longhorn Server with AES support
- *
- */
+       if (lp_parm_bool(-1, "password_hash", "create_aes_key", false)) {
        /*
+        * TODO:
+        *
+        * w2k and w2k3 doesn't support AES, so we'll not include
+        * the AES key here yet.
+        *
+        * Also we don't have an example supplementalCredentials blob
+        * from Windows Longhorn Server with AES support
+        *
+        */
+       /*
         * create ENCTYPE_AES256_CTS_HMAC_SHA1_96 key out of
         * the salt and the cleartext password
         */

Modified: branches/SAMBA_4_0/source/kdc/kdc.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/kdc.c 2007-09-07 15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/kdc/kdc.c 2007-09-07 15:35:18 UTC (rev 25001)
@@ -407,15 +407,14 @@
 /*
   start listening on the given address
 */
-static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address)
+static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
+                              uint16_t kdc_port, uint16_t kpasswd_port)
 {
        const struct model_ops *model_ops;
        struct kdc_socket *kdc_socket;
        struct kdc_socket *kpasswd_socket;
        struct socket_address *kdc_address, *kpasswd_address;
        NTSTATUS status;
-       uint16_t kdc_port = lp_krb5_port();
-       uint16_t kpasswd_port = lp_kpasswd_port();
 
        kdc_socket = talloc(kdc, struct kdc_socket);
        NT_STATUS_HAVE_NO_MEMORY(kdc_socket);
@@ -526,7 +525,8 @@
        
        for (i=0; i<num_interfaces; i++) {
                const char *address = talloc_strdup(tmp_ctx, iface_n_ip(i));
-               status = kdc_add_socket(kdc, address);
+               status = kdc_add_socket(kdc, address, lp_krb5_port(), 
+                                       lp_kpasswd_port());
                NT_STATUS_NOT_OK_RETURN(status);
        }
 

Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -538,7 +538,8 @@
                        if (!NT_STATUS_IS_OK(status)) goto failed;
                }
        } else {
-               status = add_socket(task->event_ctx, model_ops, 
lp_socket_address(), ldap_service);
+               status = add_socket(task->event_ctx, model_ops, 
+                                   lp_socket_address(), ldap_service);
                if (!NT_STATUS_IS_OK(status)) goto failed;
        }
 

Modified: branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c   2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c   2007-09-07 
15:35:18 UTC (rev 25001)
@@ -79,7 +79,7 @@
 
 static WERROR reg_dotreg_diff_done(void *_data)
 {
-       struct dotreg_data *data = _data;
+       struct dotreg_data *data = (struct dotreg_data *)_data;
 
        close(data->fd);
        talloc_free(data);

Modified: branches/SAMBA_4_0/source/lib/socket/connect_multi.c
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/connect_multi.c        2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/lib/socket/connect_multi.c        2007-09-07 
15:35:18 UTC (rev 25001)
@@ -62,7 +62,8 @@
 /*
   setup an async socket_connect, with multiple ports
 */
-_PUBLIC_ struct composite_context *socket_connect_multi_send(TALLOC_CTX 
*mem_ctx,
+_PUBLIC_ struct composite_context *socket_connect_multi_send(
+                                                   TALLOC_CTX *mem_ctx,
                                                    const char *server_address,
                                                    int num_server_ports,
                                                    uint16_t *server_ports,

Modified: branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c        2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c        2007-09-07 
15:35:18 UTC (rev 25001)
@@ -238,7 +238,7 @@
 
        unlink("torture.tdb");
 
-       pids = calloc(sizeof(pid_t), num_procs);
+       pids = (pid_t *)calloc(sizeof(pid_t), num_procs);
        pids[0] = getpid();
 
        for (i=0;i<num_procs-1;i++) {

Modified: branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c  2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c  2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -66,7 +66,8 @@
        packet->additional[0].rdata.netbios.addresses[0].ipaddr = 
                talloc_strdup(packet->additional, io->in.address);
 
-       dest = socket_address_from_strings(nbtsock, 
nbtsock->sock->backend_name, 
+       dest = socket_address_from_strings(nbtsock, 
+                                          nbtsock->sock->backend_name, 
                                           io->in.dest_addr, lp_nbt_port());
        if (dest == NULL) goto failed;
        req = nbt_name_request_send(nbtsock, dest, packet,

Modified: branches/SAMBA_4_0/source/libcli/raw/raweas.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/raweas.c       2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/raw/raweas.c       2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "smb.h"
+#include "libcli/raw/libcliraw.h"
 
 /*
   work out how many bytes on the wire a ea list will consume. 

Modified: branches/SAMBA_4_0/source/libcli/raw/rawlpq.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/rawlpq.c       2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/raw/rawlpq.c       2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "smb.h"
+#include "libcli/raw/libcliraw.h"
 
 /****************************************************************************
  lpq - async send

Modified: branches/SAMBA_4_0/source/libcli/raw/smb_signing.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/smb_signing.c  2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/raw/smb_signing.c  2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -375,7 +375,7 @@
 }
 
 
-BOOL smbcli_init_signing(struct smbcli_transport *transport) 
+bool smbcli_init_signing(struct smbcli_transport *transport) 
 {
        transport->negotiate.sign_info.mac_key = data_blob(NULL, 0);
        if (!smbcli_set_signing_off(&transport->negotiate.sign_info)) {

Modified: branches/SAMBA_4_0/source/libcli/resolve/resolve.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/resolve/resolve.c  2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/resolve/resolve.c  2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -188,7 +188,8 @@
 NTSTATUS resolve_name(struct nbt_name *name, TALLOC_CTX *mem_ctx, const char 
**reply_addr, 
                      struct event_context *ev)
 {
-       struct composite_context *c = resolve_name_send(name, ev, 
lp_name_resolve_order());
+       struct composite_context *c = resolve_name_send(name, ev, 
+                                               lp_name_resolve_order());
        return resolve_name_recv(c, mem_ctx, reply_addr);
 }
 

Modified: branches/SAMBA_4_0/source/libcli/resolve/wins.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/resolve/wins.c     2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libcli/resolve/wins.c     2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -26,9 +26,10 @@
 /*
   wins name resolution method - async send
  */
-struct composite_context *resolve_name_wins_send(TALLOC_CTX *mem_ctx, 
-                                                struct event_context 
*event_ctx,
-                                                struct nbt_name *name)
+struct composite_context *resolve_name_wins_send(
+                               TALLOC_CTX *mem_ctx, 
+                               struct event_context *event_ctx,
+                               struct nbt_name *name)
 {
        const char **address_list = lp_wins_server_list();
        if (address_list == NULL) return NULL;

Modified: branches/SAMBA_4_0/source/libnet/libnet_samdump.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_samdump.c   2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/libnet/libnet_samdump.c   2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -144,7 +144,8 @@
        return nt_status;
 }
 
-NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, 
struct libnet_SamDump *r)
+NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, 
+                       struct libnet_SamDump *r)
 {
        NTSTATUS nt_status;
        struct libnet_SamSync r2;

Modified: branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c       2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/libnet/libnet_samsync_ldb.c       2007-09-07 
15:35:18 UTC (rev 25001)
@@ -1209,7 +1209,8 @@
        state->secrets         = NULL;
        state->trusted_domains = NULL;
 
-       state->sam_ldb         = ldb_wrap_connect(mem_ctx, lp_sam_url(), 
r->in.session_info,
+       state->sam_ldb         = ldb_wrap_connect(mem_ctx, lp_sam_url(), 
+                                                 r->in.session_info,
                                                  ctx->cred, 0, NULL);
 
        r2.out.error_string    = NULL;

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c  2007-09-07 15:08:14 UTC 
(rev 25000)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c  2007-09-07 15:35:18 UTC 
(rev 25001)
@@ -477,7 +477,8 @@
        s->conn            = conn;
 
        make_nbt_name_server(&name, server);
-       resolve_req = resolve_name_send(&name, c->event_ctx, 
lp_name_resolve_order());
+       resolve_req = resolve_name_send(&name, c->event_ctx, 
+                                       lp_name_resolve_order());
        composite_continue(c, resolve_req, continue_ip_resolve_name, c);
        return c;
 }

Modified: branches/SAMBA_4_0/source/nbt_server/wins/wins_hook.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/wins/wins_hook.c       2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/nbt_server/wins/wins_hook.c       2007-09-07 
15:35:18 UTC (rev 25001)
@@ -36,7 +36,8 @@
        return "unknown";
 }
 
-void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, enum 
wins_hook_action action)
+void wins_hook(struct winsdb_handle *h, const struct winsdb_record *rec, 
+              enum wins_hook_action action)
 {
        const char *script = lp_wins_hook();
        uint32_t i, length;

Modified: branches/SAMBA_4_0/source/winbind/wb_samba3_protocol.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_samba3_protocol.c      2007-09-07 
15:08:14 UTC (rev 25000)
+++ branches/SAMBA_4_0/source/winbind/wb_samba3_protocol.c      2007-09-07 
15:35:18 UTC (rev 25001)
@@ -223,8 +223,8 @@
        uint8_t *extra_data;
        size_t extra_data_len = 0;
 
-       extra_data = call->response.extra_data.data;
-       if (extra_data) {
+       extra_data = (uint8_t *)call->response.extra_data.data;
+       if (extra_data != NULL) {
                extra_data_len = call->response.length -
                        sizeof(call->response);
        }

Reply via email to