The test was relatively convoluted and it wasn't very clear what was the problem and waht was tested. The real problem is simply a problem about a non-constant expression in an array designator. Simplify the test to clearly show that. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/ioc-typecheck.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/validation/ioc-typecheck.c b/validation/ioc-typecheck.c index aa060f7be..34b37d310 100644 --- a/validation/ioc-typecheck.c +++ b/validation/ioc-typecheck.c @@ -1,16 +1,10 @@ extern unsigned int __invalid_size_argument_for_IOC; -#define _IOC_TYPECHECK(t) \ - ((sizeof(t) == sizeof(t[1]) && \ - sizeof(t) < (1 << 14)) ? \ - sizeof(t) : __invalid_size_argument_for_IOC) - -#define TEST_IOCTL (50 | (_IOC_TYPECHECK(unsigned) << 8)) - static unsigned iocnrs[] = { - [TEST_IOCTL & 0xff] = 1, + [ 1 ? 0 : __invalid_size_argument_for_IOC ] = 1, }; /* - * check-name: correct handling of _IOC_TYPECHECK + * check-name: integer constant & conditional expression + * check-known-to-fail * * check-error-start * check-error-end -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html