From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> 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 files changed, 15 insertions(+), 0 deletions(-) diff --git a/validation/context.c b/validation/context.c index 0b45ba3..e8bb125 100644 --- a/validation/context.c +++ b/validation/context.c @@ -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