aboutsummaryrefslogtreecommitdiffstats
path: root/kerncompat.h
diff options
context:
space:
mode:
authorZach Brown <zab@redhat.com>2013-08-14 16:16:31 -0700
committerDavid Sterba <dsterba@suse.cz>2013-09-03 19:41:12 +0200
commit5ac75e2af2d29a4863e10947f1cb14ce56e1c2e7 (patch)
tree1ac3e65258da791952a080f4e08777b452ff0d88 /kerncompat.h
parentc17a056f3841b2ebc024f5af7ed2c58279641d4b (diff)
downloadbtrfs-progs-5ac75e2af2d29a4863e10947f1cb14ce56e1c2e7.tar.gz
btrfs-progs-5ac75e2af2d29a4863e10947f1cb14ce56e1c2e7.tar.xz
btrfs-progs-5ac75e2af2d29a4863e10947f1cb14ce56e1c2e7.zip
btrfs-progs: get C=1 sparse checking working again
There were a few problems that were breaking sparse checking: - We were defining CHECK_ENDIAN late in the environment, after linux/fs.h has been included which defines __force and __bitwise in confusing ways that conflict with ours. Define it up with __CHECKER__ so that linux/fs.h and our copy are acting on the same input. - We had manually set a few of gcc's internal defines to give to sparse. It's easier to just ask gcc for all the defines it sets and hand those to sparse. - We weren't passing the same *FLAGS to sparse as we were to CC. - glibc has so many errors with FORTIFY turned on that sparse gives up and doesn't show us any errors from our code. It's a questionable hack to always turn on FORTIFY ourselves, so we'll just not do that when building with sparse. And add a nice '[SP]' quiet output line for sparse checks. Signed-off-by: Zach Brown <zab@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/kerncompat.h b/kerncompat.h
index 7d57b1b..1fc2b34 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -241,7 +241,6 @@ static inline long IS_ERR(const void *ptr)
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#ifdef __CHECKER__
-#define __CHECK_ENDIAN__
#define __bitwise __bitwise__
#else
#define __bitwise