]> xenbits.xensource.com Git - xen.git/commit
x86: fix build with gcc 7
authorJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:11:36 +0000 (10:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 May 2017 08:11:36 +0000 (10:11 +0200)
commitf32400e90c046a9fd76c8917a60d34ade9c02ea2
tree2a8dcc8466ae1d6677fb80a3e21ca849f31c4ee7
parentbb8597b6d36d66a1972c62beb2300fcdeff1747f
x86: fix build with gcc 7

-Wint-in-bool-context, enabled by default in gcc 7, doesn't like
multiplication in conditional operators. "Hide" them, at the risk of
the next compiler version becoming smarter and recognizing even those.
(The hope is that added smartness then would also better deal with
legitimate cases like the ones here.)

The change could have been done in access_ok(), but I think we better
keep it at the places the compiler is actually unhappy about.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/x86/traps.c
xen/include/asm-x86/x86_64/uaccess.h