It's possible that the result of do_show_type() ends with a space. Strip this unneeded space. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- show-parse.c | 4 ++++ validation/enum-mismatch.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/show-parse.c b/show-parse.c index b892c189b..5590dae9b 100644 --- a/show-parse.c +++ b/show-parse.c @@ -408,6 +408,10 @@ out: prepend(name, "restricted "); if (fouled) prepend(name, "fouled "); + + // strip trailing space + if (name->end > name->start && name->end[-1] == ' ') + name->end--; } void show_type(struct symbol *sym) diff --git a/validation/enum-mismatch.c b/validation/enum-mismatch.c index f698c0161..1bdb1d6c2 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: unsigned int enum ea versus -enum-mismatch.c:7:16: unsigned int enum eb +enum-mismatch.c:7:16: unsigned int enum ea versus +enum-mismatch.c:7:16: unsigned int enum eb * check-error-end */ -- 2.20.0