diff options
| author | Kim Phillips <kim.phillips@freescale.com> | 2013-02-19 11:24:01 -0800 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2013-02-19 11:24:01 -0800 |
| commit | 8e42bac6efcb047a2b3d812e42c00f82e3b8a984 (patch) | |
| tree | 8eaf392717dbd7c71928a0d129e2e01d7576e9ac /validation | |
| parent | 1b8e012d10d2a5af2d4935e4a47df9c527399219 (diff) | |
| download | sparse-dev-8e42bac6efcb047a2b3d812e42c00f82e3b8a984.tar.gz | |
sparse: add built-in byte swap identifiers
this patch stops sparse from complaining about them not being
defined:
include/uapi/linux/swab.h:60:16: error: undefined identifier '__builtin_bswap32'
include/uapi/linux/swab.h:60:33: error: not a function <noident>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/builtin_bswap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/validation/builtin_bswap.c b/validation/builtin_bswap.c new file mode 100644 index 00000000..6a4a9072 --- /dev/null +++ b/validation/builtin_bswap.c @@ -0,0 +1,9 @@ +static unsigned short x = __builtin_bswap16(0); +static unsigned int y = __builtin_bswap32(0); +static unsigned long long z = __builtin_bswap64(0); + +/* + * check-name: __builtin_bswap + * check-error-start + * check-error-end + */ |
