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

Re: [Xen-devel] [PATCH] x86/IO-APIC: fix build with gcc9



On Thu, May 23, 2019 at 07:54:10AM -0600, Jan Beulich wrote:
> There are a number of pointless __packed attributes which cause gcc 9 to
> legitimately warn:
> 
> utils.c: In function 'vtd_dump_iommu_info':
> utils.c:287:33: error: converting a packed 'struct IO_APIC_route_entry' 
> pointer (alignment 1) to a 'struct IO_APIC_route_remap_entry' pointer 
> (alignment 8) may result in an unaligned pointer value 
> [-Werror=address-of-packed-member]
>   287 |                 remap = (struct IO_APIC_route_remap_entry *) &rte;
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
> 
> intremap.c: In function 'ioapic_rte_to_remap_entry':
> intremap.c:343:25: error: converting a packed 'struct IO_APIC_route_entry' 
> pointer (alignment 1) to a 'struct IO_APIC_route_remap_entry' pointer 
> (alignment 8) may result in an unaligned pointer value 
> [-Werror=address-of-packed-member]
>   343 |     remap_rte = (struct IO_APIC_route_remap_entry *) old_rte;
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Simply drop these attributes. Take the liberty and also re-format the
> structure definitions at the same time.
> 
> Reported-by: Charles Arnold <carnold@xxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.