From c0fa2e6d4e59e62f2e9f23db1a2d94532fa4ae98 Mon Sep 17 00:00:00 2001 From: John Bonesio Date: Wed, 20 Oct 2010 14:44:58 -0700 Subject: Create new and use new print_error that uses printf style formatting. yyerror is meant to be called by the parser internal code, and it's interface is limited. Instead create and call a new error message routine that allows formatted strings to be used. yyerror uses the new routine so error formatting remains consistent. Signed-of-by: John Bonesio Acked-by: David Gibson Signed-off-by: Grant Likely --- srcpos.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'srcpos.h') diff --git a/srcpos.h b/srcpos.h index 985f847..bd7966e 100644 --- a/srcpos.h +++ b/srcpos.h @@ -76,6 +76,8 @@ extern struct srcpos *srcpos_copy(struct srcpos *pos); extern char *srcpos_string(struct srcpos *pos); extern void srcpos_dump(struct srcpos *pos); +extern void srcpos_verror(struct srcpos *pos, char const *, va_list va) + __attribute__((format(printf, 2, 0))); extern void srcpos_error(struct srcpos *pos, char const *, ...) __attribute__((format(printf, 2, 3))); extern void srcpos_warn(struct srcpos *pos, char const *, ...) -- cgit v1.2.3-59-g8ed1b