diff mbox

validation/sizeof-bool: fix broken test case

Message ID 82beef733be057586c0c1b08c78ef1c585e17d46.1393763519.git.john@keeping.me.uk (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

John Keeping March 2, 2014, 12:31 p.m. UTC
Since commit 2667c2d (sparse: Allow override of sizeof(bool) warning,
2014-02-26) the default has been not to warn on sizeof(bool).  This
means that the sizeof-bool test case now needs an explicit command in
order to trigger the warning it is testing.

Signed-off-by: John Keeping <john@keeping.me.uk>
---
 validation/sizeof-bool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Christopher Li March 4, 2014, 5:02 a.m. UTC | #1
On Sun, Mar 2, 2014 at 4:31 AM, John Keeping <john@keeping.me.uk> wrote:
> Since commit 2667c2d (sparse: Allow override of sizeof(bool) warning,
> 2014-02-26) the default has been not to warn on sizeof(bool).  This
> means that the sizeof-bool test case now needs an explicit command in
> order to trigger the warning it is testing.
>
> Signed-off-by: John Keeping <john@keeping.me.uk>

Thanks for the good catch. Will apply.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/validation/sizeof-bool.c b/validation/sizeof-bool.c
index 6c68748..05e76a4 100644
--- a/validation/sizeof-bool.c
+++ b/validation/sizeof-bool.c
@@ -6,6 +6,7 @@  static int a(void)
  * check-name: sizeof(_Bool) is valid
  * check-description: sizeof(_Bool) was rejected because _Bool is not an even
  * number of bytes
+ * check-command: sparse -Wsizeof-bool $file
  * check-error-start
 sizeof-bool.c:3:16: warning: expression using sizeof bool
  * check-error-end