linuxkpi compiler.h: avoid gcc -Wunused-value in dummy expressions
authorrlibby <rlibby@FreeBSD.org>
Sat, 22 Jul 2017 21:29:44 +0000 (21:29 +0000)
committerrlibby <rlibby@FreeBSD.org>
Sat, 22 Jul 2017 21:29:44 +0000 (21:29 +0000)
commit0992a81e37caa9e38d46fb7350447b8b40432fa7
treedba17ac382eb47fbd75d4562c4ce0a07d623f549
parente38ce8ac298e3fdcf948a85d26f8c6a801bb491d
linuxkpi compiler.h: avoid gcc -Wunused-value in dummy expressions

It looks like the __acquire and __release macros are for the consumption
of static analysis tools and have no semantic effect.  Transform the
definitions from constant expressions to empty statements in order to
avoid -Wunused-value from gcc.

Likewise avoid future warnings for __chk_{user,io}_ptr, but with a cast
to void, because it looks like some linux kernel code may use those in
expression contexts.

Reviewed by: hselasky, markj
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11695
sys/compat/linuxkpi/common/include/linux/compiler.h