]> git.saurik.com Git - bison.git/commitdiff
Fix a --enable-gcc-warnings problem.
authorJoel E. Denny <jdenny@clemson.edu>
Wed, 29 Jul 2009 17:47:02 +0000 (13:47 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Wed, 29 Jul 2009 17:47:02 +0000 (13:47 -0400)
* src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
variable.

ChangeLog
src/scan-gram.l

index fa3e3a1e5854705da1195b49e3eb59d8c86959f7..487cc0288fc0fb0d6f21a7db3dcfe11e4074edab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-29  Joel E. Denny  <jdenny@ces.clemson.edu>
+
+       Fix a --enable-gcc-warnings problem.
+       * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
+       variable.
+
 2009-07-24  Alex Rozenman  <rozenmam@gmail.com>
 
        Fix some memory leaks.
index 0c12cbaa4bec2abea0a1514d08aa839f416735db..422eae64d19f6dadbdfc3683bf5e2bbe8a465b23 100644 (file)
@@ -472,9 +472,9 @@ splice       (\\[ \f\t\v]*\n)*
     {
       /* FIXME: Eventually, make these errors.  */
       size_t length = strlen (last_string);
-      if (strlen (last_string) < 3)
+      if (length < 3)
         warn_at (*loc, _("empty character literal"));
-      else if (strlen (last_string) > 3)
+      else if (length > 3)
         warn_at (*loc, _("extra characters in character literal"));
     }
     if (yytext[0] == '\n')