<div dir="ltr">this problem still exits in the master branch, <div>seems not merged into master or devel branch</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 4:13 PM, Liu Yuan <span dir="ltr"><<a href="mailto:namei.unix@gmail.com" target="_blank">namei.unix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fix following warning:<br>
<br>
...<br>
cluster/corosync.c: In function ‘corosync_get_local_addr’:<br>
cluster/corosync.c:132:22: warning: declaration of ‘sin’ shadows a global declaration [-Wshadow]<br>
CCLD sheep<br>
make[1]: Leaving directory `/home/test/sheepdog/sheep'<br>
...<br>
<br>
Signed-off-by: Liu Yuan <<a href="mailto:namei.unix@gmail.com">namei.unix@gmail.com</a>><br>
---<br>
sheep/cluster/corosync.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/sheep/cluster/corosync.c b/sheep/cluster/corosync.c<br>
index f876112..b7fc025 100644<br>
--- a/sheep/cluster/corosync.c<br>
+++ b/sheep/cluster/corosync.c<br>
@@ -129,7 +129,7 @@ static int corosync_get_local_addr(uint8_t *addr)<br>
int ret, nr;<br>
corosync_cfg_node_address_t caddr;<br>
struct sockaddr_storage *ss = (struct sockaddr_storage *)caddr.address;<br>
- struct sockaddr_in *sin = (struct sockaddr_in *)caddr.address;<br>
+ struct sockaddr_in *sin4 = (struct sockaddr_in *)caddr.address;<br>
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)caddr.address;<br>
void *saddr;<br>
<br>
@@ -149,7 +149,7 @@ static int corosync_get_local_addr(uint8_t *addr)<br>
saddr = &sin6->sin6_addr;<br>
memcpy(addr, saddr, 16);<br>
} else if (ss->ss_family == AF_INET) {<br>
- saddr = &sin->sin_addr;<br>
+ saddr = &sin4->sin_addr;<br>
memset(addr, 0, 16);<br>
memcpy(addr + 12, saddr, 4);<br>
} else {<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
sheepdog mailing list<br>
<a href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>
<a href="http://lists.wpkg.org/mailman/listinfo/sheepdog" target="_blank">http://lists.wpkg.org/mailman/listinfo/sheepdog</a><br>
</font></span></blockquote></div><br></div>