Currently when displaying the typename of an enum this typename is first prefixed with the enum base type (most often 'int'). So displaying the type for 'enum num' will give 'int enum num'. This is a bit weird, we expect to have just the type which is 'enum num'. Change this by stopping to display the base type. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- show-parse.c | 2 +- validation/enum-mismatch.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/show-parse.c b/show-parse.c index 72d3f3854..ccd60a26e 100644 --- a/show-parse.c +++ b/show-parse.c @@ -342,7 +342,7 @@ deeper: case SYM_ENUM: prepend(name, "enum %s ", show_ident(sym->ident)); - break; + goto out; case SYM_NODE: append(name, "%s", show_ident(sym->ident)); diff --git a/validation/enum-mismatch.c b/validation/enum-mismatch.c index 9a929d24c..9d61f5816 100644 --- a/validation/enum-mismatch.c +++ b/validation/enum-mismatch.c @@ -13,7 +13,7 @@ static enum eb foo(enum ea a) * * check-error-start enum-mismatch.c:7:16: warning: mixing different enum types -enum-mismatch.c:7:16: int enum ea versus -enum-mismatch.c:7:16: int enum eb +enum-mismatch.c:7:16: enum ea versus +enum-mismatch.c:7:16: enum eb * check-error-end */ -- 2.17.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