bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reader.c changes to avoid GCC warnings


From: Paul Eggert
Subject: reader.c changes to avoid GCC warnings
Date: Wed, 28 Dec 2005 00:32:11 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this:

2005-12-28  Paul Eggert  <address@hidden>

        * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
        GCC warnings.

--- src/reader.c        27 Dec 2005 19:54:41 -0000      1.243
+++ src/reader.c        28 Dec 2005 08:31:22 -0000      1.244
@@ -247,17 +247,19 @@ grammar_rule_check (const symbol_list *r
 
   /* Check that typed symbol values are used.  */
   {
-    symbol_list *l = r;
+    symbol_list const *l = r;
     int n = 0;
     for (; l && l->sym; l = l->next, ++n)
       if (! (l->used
             || !l->sym->type_name
             /* The default action, $$ = $1, `uses' both.  */
-            || !r->action && (n == 0 || n == 1)))
-       if (n)
-         warn_at (r->location, _("unused value: $%d"), n);
-       else
-         warn_at (r->location, _("unset value: $$"));
+            || (!r->action && (n == 0 || n == 1))))
+       {
+         if (n)
+           warn_at (r->location, _("unused value: $%d"), n);
+         else
+           warn_at (r->location, _("unset value: $$"));
+       }
   }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]