summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Meerwald <p.meerwald@bct-electronic.com>2012-10-23 17:37:24 +0200
committerTanu Kaskinen <tanuk@iki.fi>2012-10-24 12:24:57 +0300
commit2a33b07d69a5c08b3325ca3f1ec40f428c659ce5 (patch)
tree81316ed57b6da360dd139709c54a04db5a4085cf
parent7448ef14baf3725ce465858262a5541bdd9c5f18 (diff)
rtp: Fix warning using pa_assert_not_reached()
modules/rtp/module-rtp-recv.c:462:8: warning: 'r' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
-rw-r--r--src/modules/rtp/module-rtp-recv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 412f4c325..3e9250c09 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -451,13 +451,14 @@ static int mcast_socket(const struct sockaddr* sa, socklen_t salen) {
mr4.imr_multiaddr = ((const struct sockaddr_in*) sa)->sin_addr;
r = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mr4, sizeof(mr4));
#ifdef HAVE_IPV6
- } else {
+ } else if (af == AF_INET6) {
struct ipv6_mreq mr6;
memset(&mr6, 0, sizeof(mr6));
mr6.ipv6mr_multiaddr = ((const struct sockaddr_in6*) sa)->sin6_addr;
r = setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mr6, sizeof(mr6));
#endif
- }
+ } else
+ pa_assert_not_reached();
if (r < 0) {
pa_log_info("Joining mcast group failed: %s", pa_cstrerror(errno));