btrfs-progs: avoid redefined __bitwise__ warning
PATCH 1/1 btrfs-progs: avoid redefined __bitwise__ warning
compile warning:
./kerncompat.h:142: warning: "__bitwise__" redefined
#define __bitwise__
In file included from ./kerncompat.h:35,
from check/qgroup-verify.c:24:
/usr/include/linux/types.h:25: note: this is the location of the previous definition
#define __bitwise__ __bitwiseBecause __bitwise__ is already defined in newer kernel-headers (/usr/include/linux/types.h), so add #ifndef to avoid this warning.
Signed-off-by Wang Yugui <[email protected]>
--- kerncompat.h | 2 ++ 1 file changed, 2 insertions(+)
kerncompat.h +2 -0
@@ -139,8 +139,10 @@ static inline void bugon_trace(const char *assertion, const char *filename,#define __bitwise__ __attribute__((bitwise))#else #define __force +#ifndef __bitwise__#define __bitwise__#endif +#endif #ifndef __CHECKER__/*
Signature · 1 line
2.36.2
Quoted 9 lines · Wang Yugui
compile warning:
./kerncompat.h:142: warning: "__bitwise__" redefined #define __bitwise__ In file included from ./kerncompat.h:35, from check/qgroup-verify.c:24: /usr/include/linux/types.h:25: note: this is the location of the previous definition #define __bitwise__ __bitwise
Quoted 4 lines
Because
__bitwise__is already defined in newer kernel-headers (/usr/include/linux/types.h), so add #ifndef to avoid this warning.Signed-off-by Wang Yugui <[email protected]>
Reviewed-by Qu Wenruo <[email protected]>
Thanks,
Qu
Quoted 19 lines
--- kerncompat.h | 2 ++ 1 file changed, 2 insertions(+)kerncompat.h +2
-0@@ -139,8 +139,10 @@ static inline void bugon_trace(const char *assertion, const char *filename,#define __bitwise__ __attribute__((bitwise))#else #define __force +#ifndef __bitwise__#define __bitwise__#endif +#endif #ifndef __CHECKER__/*
Quoted 9 lines · Wang Yugui
compile warning:
./kerncompat.h:142: warning: "__bitwise__" redefined #define __bitwise__ In file included from ./kerncompat.h:35, from check/qgroup-verify.c:24: /usr/include/linux/types.h:25: note: this is the location of the previous definition #define __bitwise__ __bitwise
Quoted 4 lines
Because
__bitwise__is already defined in newer kernel-headers (/usr/include/linux/types.h), so add #ifndef to avoid this warning.Signed-off-by Wang Yugui <[email protected]>
Added to devel, thanks.