From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Josh Triplett <josh@joshtriplett.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 1/3] fix conditional context test case with void
Date: Sun, 29 Jan 2017 12:34:07 +0100 [thread overview]
Message-ID: <20170129113409.9834-2-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170129113409.9834-1-luc.vanoostenryck@gmail.com>
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>
---
validation/context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/validation/context.c b/validation/context.c
index 33b70b84b..b9500dc75 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)
--
2.11.0
next prev parent reply other threads:[~2017-01-29 12:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 11:34 [PATCH 0/3] validate expression's type in conditionals Luc Van Oostenryck
2017-01-29 11:34 ` Luc Van Oostenryck [this message]
2017-01-29 11:34 ` [PATCH 2/3] add helper: is_scalar_type() Luc Van Oostenryck
2017-01-29 11:34 ` [PATCH 3/3] validate expression's type in conditionals Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170129113409.9834-2-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).