LinuxKPI: Appease -Wunused-but-set-variable warnings from GCC.
- Mark assert dummy variables as __unused. - Use a dummy (void) cast of the flags argument passed to spin_unlock_irqrestore so it gets treated as used. Reviewed by: manu, hselasky Differential Revision: https://reviews.freebsd.org/D39349
This commit is contained in:
parent
e93da76b07
commit
ad83dd2b2b
@ -103,7 +103,7 @@
|
||||
#define _O_CTASSERT(x) _O__CTASSERT(x, __LINE__)
|
||||
#define _O__CTASSERT(x, y) _O___CTASSERT(x, y)
|
||||
#define _O___CTASSERT(x, y) while (0) { \
|
||||
typedef char __assert_line_ ## y[(x) ? 1 : -1]; \
|
||||
typedef char __unused __assert_line_ ## y[(x) ? 1 : -1]; \
|
||||
__assert_line_ ## y _x; \
|
||||
_x[0] = '\0'; \
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ typedef struct {
|
||||
} while (0)
|
||||
|
||||
#define spin_unlock_irqrestore(_l, flags) do { \
|
||||
(void)(flags); \
|
||||
spin_unlock(_l); \
|
||||
} while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user