]> xenbits.xensource.com Git - libvirt.git/commitdiff
Ignore cast alignment warnings in inotify code for Xen.
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 11:44:15 +0000 (12:44 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 14 May 2013 14:00:22 +0000 (15:00 +0100)
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@redhat.com>
src/xen/xen_inotify.c

index b032bba1398b09020c45eba902cc2ca9a65dc3d7..e13c57298a61a4306fd7b63255cd50ca1d85057f 100644 (file)
@@ -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);