btrfs-progs: kerncompat: 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__ __bitwise

Because  __bitwise__ is already defined in newer kernel-headers
(/usr/include/linux/types.h), so add #ifndef to avoid this warning.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Wang Yugui <wangyugui@e16-tech.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Wang Yugui 2022-08-16 09:37:03 +08:00 committed by David Sterba
parent e97c158b36
commit 588429caf9

View file

@ -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__
/*