From ae09ec8577cbf72188164ab42ba2ea022722b78c Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 29 Jun 2009 08:34:21 -0600 Subject: [PATCH] scan-code: avoid compiler warnings * src/scan-code.l (parse_named_ref): Use correct specifiers. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ src/scan-code.l | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf4a90b3..52b30c21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-29 Eric Blake + + scan-code: avoid compiler warnings + * src/scan-code.l (parse_named_ref): Use correct specifiers. + 2009-06-29 Akim Demaille build: avoid concurrent extraction of calc++. diff --git a/src/scan-code.l b/src/scan-code.l index 572f806f..36990f38 100644 --- a/src/scan-code.l +++ b/src/scan-code.l @@ -534,7 +534,7 @@ parse_named_ref(char *cp, symbol_list *rule, int rule_length, if (variant->ind == 0) strcpy(at_buf, "$$"); else - snprintf(at_buf, sizeof(at_buf), "$%d", variant->ind); + snprintf(at_buf, sizeof(at_buf), "$%ld", variant->ind); if (variant->err == 0) complain_at (variant->loc, _(" refers to: %c%s at %s"), @@ -588,7 +588,7 @@ parse_named_ref(char *cp, symbol_list *rule, int rule_length, "mid-rule action at $%d", midrule_rhs_index); obstack_1grow (&msg_buf, '\0'); - complain_at (loc, _("%s"), obstack_finish (&msg_buf)); + complain_at (loc, _("%s"), (char *) obstack_finish (&msg_buf)); obstack_free (&msg_buf, 0); } } -- 2.45.2