Project

General

Profile

Download (1.02 KB) Statistics
| Branch: | Tag: | Revision:
7e8045d8 David Sorber
/* support for the sparse static analyzer */

#ifndef __SPARSE_H__
#define __SPARSE_H__

#ifdef __CHECKER__
#define __force __attribute__((force))
/* Avoid name clash with __bitwise defined in linux/types.h. */
#define __ffsw_bitwise __attribute__((bitwise))
#define __unitlike __attribute__((unitlike))
#define __designated_init __attribute__((designated_init))
#define __allow_by_value __attribute__((allow_by_value))
#define __allow_large_assignment __attribute__((allow_large_assignment))
#define __disallow_by_value __attribute__((disallow_by_value))
#define NOT_CHECKERED(...)
#else /* __CHECKER__ */
#define __force /**/
#define __ffsw_bitwise /**/
#define __unitlike /**/
#define __designated_init /**/
#define __allow_by_value /**/
#define __allow_large_assignment /**/
#define __disallow_by_value /**/
#define __aligned_void void
#define __writeonly /**/
#define __force_local_static /**/
#define NOT_CHECKERED(...) __VA_ARGS__
#endif /* __CHECKER__ */

#endif /* __SPARSE_H__ */