Message ID | 20220816013703.72722-1-wangyugui@e16-tech.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: avoid redefined __bitwise__ warning | expand |
On 2022/8/16 09:37, Wang Yugui wrote: > 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 > > 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 <wangyugui@e16-tech.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > kerncompat.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kerncompat.h b/kerncompat.h > index f6477990..15595500 100644 > --- a/kerncompat.h > +++ b/kerncompat.h > @@ -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__ > /*
On Tue, Aug 16, 2022 at 09:37:03AM +0800, Wang Yugui wrote: > 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 > > 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 <wangyugui@e16-tech.com> Added to devel, thanks.
diff --git a/kerncompat.h b/kerncompat.h index f6477990..15595500 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -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__ /*
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 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 <wangyugui@e16-tech.com> --- kerncompat.h | 2 ++ 1 file changed, 2 insertions(+)