qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] SLIRP warning messages displayed while compiling


From: Samuel Thibault
Subject: Re: [Qemu-devel] SLIRP warning messages displayed while compiling
Date: Fri, 11 Aug 2017 23:58:45 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Hello,

Programmingkid, on jeu. 10 août 2017 16:44:19 -0400, wrote:
> While compiling I saw these error messages:
> 
> slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' of 
> class or
>       structure 'ip6' may result in an unaligned pointer value
>       [-Waddress-of-packed-member]
>     if (IN6_IS_ADDR_MULTICAST(&ip->ip_src) ||
>                                ^~~~~~~~~~

> slirp/ip_input.c:159:43: warning: taking address of packed member 'ip_link' 
> of class or
>       structure 'ipq' may result in an unaligned pointer value
>       [-Waddress-of-packed-member]
>                 for (l = slirp->ipq.ip_link.next; l != &slirp->ipq.ip_link;
>                                                         ^~~~~~~~~~~~~~~~~~

Well, if the compiler was counting well, it would notice that the
structure are made so that even with packing, fields always get aligned
on proper bounds.

(and no, we don't want to remove QEMU_PACKED from struct ip6, at least,
since it *has* to be packed to match the ipv6 headers).

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]