bmf: fix GCC 6 warnings
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Feb 2016 18:16:12 +0000 (19:16 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 25 Feb 2016 12:39:33 +0000 (13:39 +0100)
commit70d9d6199b8d6ed18c95c553e65ce44dda8749e9
treed1ecd8c06300b75cf2507c693d7e8ac18296c17a
parent5aa4442c02e0886097de132ebaa5778851111053
bmf: fix GCC 6 warnings

src/NetworkInterfaces.c: In function ‘CreateLocalEtherTunTap’:
src/NetworkInterfaces.c:1275:25: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   ((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_addr))->sin_addr.s_addr = htonl(EtherTunTapIp);
                         ^
src/NetworkInterfaces.c:1280:27: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_netmask))->sin_addr.s_addr = htonl(EtherTunTapIpMask);
                           ^
src/NetworkInterfaces.c:1285:29: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       ((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifreq.ifr_broadaddr))->sin_addr.s_addr = htonl(EtherTunTapIpBroadcast);
                             ^
src/NetworkInterfaces.c: In function ‘CreateInterface’:
src/NetworkInterfaces.c:1497:50: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       newIf->intAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_addr))->sin_addr;
                                                  ^
src/NetworkInterfaces.c:1513:52: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       newIf->broadAddr.v4 = ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&ifr.ifr_broadaddr))->sin_addr;
                                                    ^
src/NetworkInterfaces.c: In function ‘CreateBmfNetworkInterfaces’:
src/NetworkInterfaces.c:1626:40: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ipAddr.v4 =  ((struct sockaddr_in*) ARM_NOWARN_ALIGN(&ifr->ifr_addr))->sin_addr;
                                        ^
src/NetworkInterfaces.c: In function ‘AddMulticastRoute’:
src/NetworkInterfaces.c:1944:12: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_dst))->sin_addr.s_addr = htonl(0xE0000000);
            ^~~~~~~~~~~
src/NetworkInterfaces.c:1945:12: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
   ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_genmask))->sin_addr.s_addr = htonl(0xF0000000);
            ^~~~~~~~~~~
src/NetworkInterfaces.c: In function ‘DeleteMulticastRoute’:
src/NetworkInterfaces.c:1989:14: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_dst))->sin_addr.s_addr = htonl(0xE0000000);
              ^~~~~~~~~~~
src/NetworkInterfaces.c:1990:14: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
     ((struct sockaddr_in *) ARM_NOWARN_ALIGN(&kernel_route.rt_genmask))->sin_addr.s_addr = htonl(0xF0000000);
              ^~~~~~~~~~~

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/bmf/src/NetworkInterfaces.c