diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-01-29 12:34:07 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-13 09:34:45 +0800 |
| commit | d1de74fffc9dcc7cd5eecf05b69d3df8091a4b3b (patch) | |
| tree | 4c91ecde63254a296e14152aa5ce0dbbc2ef2a05 | |
| parent | c6bbdaf57222d77d9c64b53b784372f8bfe70eda (diff) | |
| download | sparse-dev-d1de74fffc9dcc7cd5eecf05b69d3df8091a4b3b.tar.gz | |
fix conditional context test case with void
The test file for context checking contains a few test cases
with a conditional, mimicking kernels's __cond_lock().
But the macro involved use as condition the return value of
a function, _ca(), which itself returns void ...
Fix the test by giving _ca() a return type of 'int'.
CC: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
| -rw-r--r-- | validation/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/validation/context.c b/validation/context.c index 33b70b84..b9500dc7 100644 --- a/validation/context.c +++ b/validation/context.c @@ -10,7 +10,7 @@ static void r(void) __attribute__((context(1,0))) __context__(-1); } -extern void _ca(int fail); +extern int _ca(int fail); #define ca(fail) __cond_lock(_ca(fail)) static void good_paired1(void) |
