btrfs-progs: remove __CHECKER__ from main code
authorZach Brown <zab@redhat.com>
Wed, 14 Aug 2013 23:16:32 +0000 (16:16 -0700)
committerDavid Sterba <dsterba@suse.cz>
Tue, 3 Sep 2013 17:41:01 +0000 (19:41 +0200)
__CHECKER__ is only for the type juggling used to tell sparse which
types need conversion between address spaces.  It is not OK to use to
change the code that gets checked to avoid bugs elsewhere in the build
infrastructure.  We want to check the code that builds when the checker
isn't enabled.

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>
btrfs-convert.c
btrfs-list.c
cmds-device.c
mkfs.c
utils.c

index a4608ec..9a7da57 100644 (file)
 
 #include "kerncompat.h"
 
-#ifndef __CHECKER__
 #include <sys/ioctl.h>
 #include <sys/mount.h>
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
index 072a592..214cb45 100644 (file)
  */
 
 #define _GNU_SOURCE
-#ifndef __CHECKER__
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include "ioctl.h"
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
index be2aaff..48ac526 100644 (file)
 
 #include "commands.h"
 
-/* FIXME - imported cruft, fix sparse errors and warnings */
-#ifdef __CHECKER__
-#define BLKGETSIZE64 0
-#define BTRFS_IOC_SNAP_CREATE_V2 0
-#define BTRFS_VOL_NAME_MAX 255
-struct btrfs_ioctl_vol_args { char name[BTRFS_VOL_NAME_MAX]; };
-static inline int ioctl(int fd, int define, void *arg) { return 0; }
-#endif
-
 static const char * const device_cmd_group_usage[] = {
        "btrfs device <command> [<args>]",
        NULL
diff --git a/mkfs.c b/mkfs.c
index 5238b89..6f9a160 100644 (file)
--- a/mkfs.c
+++ b/mkfs.c
 
 #include "kerncompat.h"
 
-#ifndef __CHECKER__
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include "ioctl.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
diff --git a/utils.c b/utils.c
index 0717972..6154677 100644 (file)
--- a/utils.c
+++ b/utils.c
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifndef __CHECKER__
 #include <sys/ioctl.h>
 #include <sys/mount.h>
-#endif
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <uuid/uuid.h>
 #include "volumes.h"
 #include "ioctl.h"
 
-#ifdef __CHECKER__
-#define BLKGETSIZE64 0
-static inline int ioctl(int fd, int define, u64 *size) { return 0; }
-#endif
-
 #ifndef BLKDISCARD
 #define BLKDISCARD     _IO(0x12,119)
 #endif