Test that giving __attribute__((context(TEST,1,0))) __attribute__((context(TEST,0,1))) instead of __attribute__((context(TEST,1,1))) works. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- validation/context.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- sparse.orig/validation/context.c 2008-05-13 23:40:36.000000000 +0200 +++ sparse/validation/context.c 2008-05-14 00:58:33.000000000 +0200 @@ -380,6 +380,21 @@ static int warn_conditional(void) return 0; } +static void good_require(void) +__attribute__((context(TEST,1,0))) +__attribute__((context(TEST,0,1))) +{ + __context__(TEST,-1); + __context__(TEST,1); +} + +static void good_require_caller(void) +{ + __context__(TEST,1,0); + good_require(); + __context__(TEST,-1,1); +} + /* * check-name: Check -Wcontext * -- -- 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