]> git.saurik.com Git - bison.git/commitdiff
scan-code: avoid compiler warnings
authorEric Blake <ebb9@byu.net>
Mon, 29 Jun 2009 14:34:21 +0000 (08:34 -0600)
committerEric Blake <ebb9@byu.net>
Tue, 30 Jun 2009 03:53:25 +0000 (21:53 -0600)
* src/scan-code.l (parse_named_ref): Use correct specifiers.

Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit ae09ec8577cbf72188164ab42ba2ea022722b78c)

ChangeLog
src/scan-code.l

index bc9713603a2c562c55ef0e7b40cd6557130ef3f2..df07483a12567cff969ca62fbc8903329e0b65bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-29  Eric Blake  <ebb9@byu.net>
+
+       scan-code: avoid compiler warnings
+       * src/scan-code.l (parse_named_ref): Use correct specifiers.
+
 2009-06-29  Akim Demaille  <demaille@gostai.com>
 
        build: avoid concurrent extraction of calc++.
index 4c91fd1ac12782378d81c95794e3531364d76788..28a9fe479c9548eb0004a4391b40639cc62e73ab 100644 (file)
@@ -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);
        }
     }