File gcc7-xen.patch of Package xen.openSUSE_Leap_42.3_Update

In file included from /home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/uaccess.h:11:0,
                 from /home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/guest_access.h:10,
                 from /home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/xen/guest_access.h:10,
                 from compat.c:1:
runtime.c: In function 'efi_compat_get_info':
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/x86_64/uaccess.h:58:37: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
      compat_access_ok(addr, (count) * (size)))
                                     ^
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/x86_64/uaccess.h:48:22: note: in definition of macro '__compat_addr_ok'
     ((unsigned long)(addr) < HYPERVISOR_COMPAT_VIRT_START(d))
                      ^~~~
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/x86_64/uaccess.h:54:5: note: in expansion of macro '__compat_access_ok'
     __compat_access_ok(current->domain, addr, size)
     ^~~~~~~~~~~~~~~~~~
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/asm/x86_64/uaccess.h:58:6: note: in expansion of macro 'compat_access_ok'
      compat_access_ok(addr, (count) * (size)))
      ^~~~~~~~~~~~~~~~
/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/include/xen/compat.h:95:5: note: in expansion of macro 'compat_array_access_ok'
     compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr),        \
     ^~~~~~~~~~~~~~~~~~~~~~
compat.c:19:27: note: in expansion of macro 'compat_handle_okay'
 #define guest_handle_okay compat_handle_okay
                           ^~~~~~~~~~~~~~~~~~
runtime.c:229:15: note: in expansion of macro 'guest_handle_okay'
         if ( !guest_handle_okay(guest_handle_cast(info->vendor.name,
               ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/abuild/rpmbuild/BUILD/xen-4.9.0-testing/xen/Rules.mk:174: compat.o] Error 1


--- xen-4.9.0-testing/xen/Rules.mk.orig	2017-05-18 16:00:55.717033728 -0600
+++ xen-4.9.0-testing/xen/Rules.mk	2017-05-18 16:01:22.944001605 -0600
@@ -47,7 +47,7 @@ CFLAGS += -O2 -fomit-frame-pointer
 endif
 
 CFLAGS += -nostdinc -fno-builtin -fno-common
-CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
+CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith -Wno-int-in-bool-context
 CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
 CFLAGS += '-D__OBJECT_FILE__="$@"'
 
openSUSE Build Service is sponsored by