[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1484-g646668b

Volker Lendecke vlendec at samba.org
Thu May 7 21:39:38 GMT 2009


The branch, master has been updated
       via  646668bc51d42273a3665bd80bd044287e73bf2a (commit)
       via  26a9643e456dc39085a93dce231a4e58df361ae9 (commit)
       via  2c1372b0d2addf0c06f83af6f4b7ffcfceae6611 (commit)
      from  b475a1e7ebfcc1e1e11800bf93893eae11966d05 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 646668bc51d42273a3665bd80bd044287e73bf2a
Author: Volker Lendecke <vl at samba.org>
Date:   Thu May 7 23:07:55 2009 +0200

    Fix some type-punned warnings

commit 26a9643e456dc39085a93dce231a4e58df361ae9
Author: Volker Lendecke <vl at samba.org>
Date:   Wed May 6 15:12:27 2009 +0200

    Remove a misleading comment

commit 2c1372b0d2addf0c06f83af6f4b7ffcfceae6611
Author: Volker Lendecke <vl at samba.org>
Date:   Thu May 7 23:25:49 2009 +0200

    Fix some nonempty blank lines

-----------------------------------------------------------------------

Summary of changes:
 source3/winbindd/winbindd.c      |   13 +++++++------
 source3/winbindd/winbindd_cm.c   |    7 +++++--
 source3/winbindd/winbindd_dual.c |   21 ++++++++++-----------
 source3/winbindd/winbindd_wins.c |    2 +-
 4 files changed, 23 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 6627106..bcfe528 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -741,14 +741,16 @@ static void request_len_recv(void *private_data, bool success)
 		return;
 	}
 
-	if (*(uint32 *)(&state->request) != sizeof(state->request)) {
+	if (*(uint32 *)(void *)(&state->request) != sizeof(state->request)) {
 		DEBUG(0,("request_len_recv: Invalid request size received: %d (expected %u)\n",
-			 *(uint32_t *)(&state->request), (uint32_t)sizeof(state->request)));
+			 *(uint32_t *)(void *)(&state->request),
+			 (uint32_t)sizeof(state->request)));
 		state->finished = True;
 		return;
 	}
 
-	setup_async_read(&state->fd_event, (uint32 *)(&state->request)+1,
+	setup_async_read(&state->fd_event,
+			 (uint32 *)(void *)(&state->request)+1,
 			 sizeof(state->request) - sizeof(uint32),
 			 request_main_recv, state);
 }
@@ -821,7 +823,8 @@ static void new_connection(int listen_sock, bool privileged)
 	len = sizeof(sunaddr);
 
 	do {
-		sock = accept(listen_sock, (struct sockaddr *)&sunaddr, &len);
+		sock = accept(listen_sock, (struct sockaddr *)(void *)&sunaddr,
+			      &len);
 	} while (sock == -1 && errno == EINTR);
 
 	if (sock == -1)
@@ -955,8 +958,6 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev,
 			break;
 		}
 	}
-
-	/* new, non-privileged connection */
 	new_connection(s->fd, s->privileged);
 }
 
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index b59a391..396a303 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -769,7 +769,8 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
 	struct sockaddr peeraddr;
 	socklen_t peeraddr_len;
 
-	struct sockaddr_in *peeraddr_in = (struct sockaddr_in *)&peeraddr;
+	struct sockaddr_in *peeraddr_in =
+		(struct sockaddr_in *)(void *)&peeraddr;
 
 	DEBUG(10,("cm_prepare_connection: connecting to DC %s for domain %s\n",
 		controller, domain->name ));
@@ -1040,7 +1041,9 @@ static bool add_one_dc_unique(TALLOC_CTX *mem_ctx, const char *domain_name,
 
 	/* Make sure there's no duplicates in the list */
 	for (i=0; i<*num; i++)
-		if (sockaddr_equal((struct sockaddr *)&(*dcs)[i].ss, (struct sockaddr *)pss))
+		if (sockaddr_equal(
+			    (struct sockaddr *)(void *)&(*dcs)[i].ss,
+			    (struct sockaddr *)(void *)pss))
 			return False;
 
 	*dcs = TALLOC_REALLOC_ARRAY(mem_ctx, *dcs, struct dc_name_ip, (*num)+1);
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index f56a63f..d045678 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -5,17 +5,17 @@
 
    Copyright (C) Andrew Tridgell 2002
    Copyright (C) Volker Lendecke 2004,2005
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -277,7 +277,7 @@ static void async_reply_recv(void *private_data, bool success)
 					   state->response));
 
 	cache_cleanup_response(state->child_pid);
-	
+
 	DLIST_REMOVE(child->requests, state);
 
 	schedule_async_request(child);
@@ -499,7 +499,7 @@ void winbind_child_died(pid_t pid)
 	/* This will be re-added in fork_domain_child() */
 
 	DLIST_REMOVE(children, child);
-	
+
 	remove_fd_event(&child->event);
 	close(child->event.fd);
 	child->event.fd = 0;
@@ -545,7 +545,7 @@ void winbind_msg_debug(struct messaging_context *msg_ctx,
 	struct winbindd_child *child;
 
 	DEBUG(10,("winbind_msg_debug: got debug message.\n"));
-	
+
 	debug_message(msg_ctx, private_data, MSG_DEBUG, server_id, data);
 
 	for (child = children; child != NULL; child = child->next) {
@@ -657,7 +657,7 @@ void winbind_msg_online(struct messaging_context *msg_ctx,
 
 		if ( domain->primary ) {
 			struct winbindd_child *idmap = idmap_child();
-			
+
 			if ( idmap->pid != 0 ) {
 				messaging_send_buf(msg_ctx,
 						   pid_to_procid(idmap->pid), 
@@ -665,7 +665,6 @@ void winbind_msg_online(struct messaging_context *msg_ctx,
 						   (uint8 *)domain->name,
 						   strlen(domain->name)+1);
 			}
-			
 		}
 	}
 
@@ -1105,7 +1104,7 @@ static void child_msg_onlinestatus(struct messaging_context *msg_ctx,
 	TALLOC_CTX *mem_ctx;
 	const char *message;
 	struct server_id *sender;
-	
+
 	DEBUG(5,("winbind_msg_onlinestatus received.\n"));
 
 	if (!data->data) {
@@ -1118,7 +1117,7 @@ static void child_msg_onlinestatus(struct messaging_context *msg_ctx,
 	if (mem_ctx == NULL) {
 		return;
 	}
-	
+
 	message = collect_onlinestatus(mem_ctx);
 	if (message == NULL) {
 		talloc_destroy(mem_ctx);
@@ -1326,7 +1325,7 @@ static bool fork_domain_child(struct winbindd_child *child)
 			}
 		}
 	}
-	
+
 	/*
 	 * We are in idmap child, make sure that we set the
 	 * check_online_event to bring primary domain online.
diff --git a/source3/winbindd/winbindd_wins.c b/source3/winbindd/winbindd_wins.c
index f9ba13f..82bf199 100644
--- a/source3/winbindd/winbindd_wins.c
+++ b/source3/winbindd/winbindd_wins.c
@@ -59,7 +59,7 @@ static int wins_lookup_open_socket_in(void)
 
 	/* now we've got a socket - we need to bind it */
 
-	if (bind(res, (struct sockaddr * ) &sock,sizeof(sock)) < 0) {
+	if (bind(res, (struct sockaddr *)(void *)&sock, sizeof(sock)) < 0) {
 		close(res);
 		return(-1);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list