mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
0ecee546c5
commit
4e64c62564
1 changed files with 4 additions and 4 deletions
|
|
@ -40,13 +40,13 @@
|
|||
#define __force
|
||||
#define __nocast
|
||||
#define __iomem
|
||||
#define __chk_user_ptr(x) 0
|
||||
#define __chk_io_ptr(x) 0
|
||||
#define __chk_user_ptr(x) ((void)0)
|
||||
#define __chk_io_ptr(x) ((void)0)
|
||||
#define __builtin_warning(x, y...) (1)
|
||||
#define __acquires(x)
|
||||
#define __releases(x)
|
||||
#define __acquire(x) 0
|
||||
#define __release(x) 0
|
||||
#define __acquire(x) do { } while (0)
|
||||
#define __release(x) do { } while (0)
|
||||
#define __cond_lock(x,c) (c)
|
||||
#define __bitwise
|
||||
#define __devinitdata
|
||||
|
|
|
|||
Loading…
Reference in a new issue