[libvirt] [PATCH 3/6] Ignore cast alignment warnings in inotify code for Xen.

Eric Blake eblake at redhat.com
Mon May 13 19:27:15 UTC 2013


On 05/13/2013 06:17 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The inotify Xen code causes a cast alignment warning, but this
> is harmless since the kernel inotify interface will ensure
> sufficient alignment of the inotify structs in the buffer being
> read
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/xen/xen_inotify.c | 3 +++
>  1 file changed, 3 insertions(+)

ACK.

> 
> diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
> index b032bba..e13c572 100644
> --- a/src/xen/xen_inotify.c
> +++ b/src/xen/xen_inotify.c
> @@ -278,7 +278,10 @@ reread:
>          if (got < sizeof(struct inotify_event))
>              goto cleanup; /* bad */
>  
> +        VIR_WARNINGS_NO_CAST_ALIGN
>          e = (struct inotify_event *)tmp;
> +        VIR_WARNINGS_RESET
> +
>          tmp += sizeof(struct inotify_event);
>          got -= sizeof(struct inotify_event);
>  
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130513/55613b23/attachment-0001.sig>


More information about the libvir-list mailing list