blob: 1b175bb49bc5440f90af30ae213918ef71978e8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#if defined(__GNUC__)
#define UNUSED __attribute__((unused))
#define SIZE(x) static (x)
#define NON_NULL SIZE(1)
#elif defined(__clang__)
#define UNUSED __attribute__((unused))
#define SIZE(x) static (x)
#define NON_NULL SIZE(1)
#else
/*
For example MSVC, which is not fully C11 compliant (e.g. it does not support
a[static N] notation for array parameters).
*/
#define UNUSED
#define SIZE(x)
#define NON_NULL
#endif
|