summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-07-04 16:09:09 +0200
committerVolker Lendecke <vl@samba.org>2010-07-04 16:41:14 +0200
commitb3194be286a6af28044375e893cfa0b095dba6e6 (patch)
tree9e153217e848b9ac11fea8330e052bc042b74147 /source3/nmbd
parenteb50f77154e23b9dc231926d5a0af07dd7761bc4 (diff)
downloadsamba-b3194be286a6af28044375e893cfa0b095dba6e6.tar.gz
samba-b3194be286a6af28044375e893cfa0b095dba6e6.tar.bz2
samba-b3194be286a6af28044375e893cfa0b095dba6e6.zip
s3: Fix some type-punned warnings
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index f211d6c671..d13607b1f5 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -255,8 +255,9 @@ static void reload_interfaces(time_t t)
continue;
}
- ip = ((struct sockaddr_in *)&iface->ip)->sin_addr;
- nmask = ((struct sockaddr_in *)&iface->netmask)->sin_addr;
+ ip = ((struct sockaddr_in *)(void *)&iface->ip)->sin_addr;
+ nmask = ((struct sockaddr_in *)(void *)
+ &iface->netmask)->sin_addr;
/*
* We don't want to add a loopback interface, in case
@@ -264,7 +265,7 @@ static void reload_interfaces(time_t t)
* ignore it here. JRA.
*/
- if (is_loopback_addr((struct sockaddr *)&iface->ip)) {
+ if (is_loopback_addr((struct sockaddr *)(void *)&iface->ip)) {
DEBUG(2,("reload_interfaces: Ignoring loopback "
"interface %s\n",
print_sockaddr(str, sizeof(str), &iface->ip) ));
@@ -303,8 +304,10 @@ static void reload_interfaces(time_t t)
"ignoring non IPv4 interface.\n"));
continue;
}
- ip = ((struct sockaddr_in *)&iface->ip)->sin_addr;
- nmask = ((struct sockaddr_in *)&iface->netmask)->sin_addr;
+ ip = ((struct sockaddr_in *)(void *)
+ &iface->ip)->sin_addr;
+ nmask = ((struct sockaddr_in *)(void *)
+ &iface->netmask)->sin_addr;
if (ip_equal_v4(ip, subrec->myip) &&
ip_equal_v4(nmask, subrec->mask_ip)) {
break;
@@ -434,7 +437,7 @@ static void msg_nmbd_send_packet(struct messaging_context *msg,
}
in_addr_to_sockaddr_storage(&ss, p->ip);
- pss = iface_ip((struct sockaddr *)&ss);
+ pss = iface_ip((struct sockaddr *)(void *)&ss);
if (pss == NULL) {
DEBUG(2, ("Could not find ip for packet from %u\n",