Fix a --enable-gcc-warnings problem.

* src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
variable.
(cherry picked from commit a1ed2b71fa)
This commit is contained in:
Joel E. Denny
2009-07-29 13:47:02 -04:00
parent 3208e3f4d9
commit 91a2af9753
2 changed files with 8 additions and 2 deletions

View File

@@ -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 Joel E. Denny <jdenny@ces.clemson.edu>
Warn about character literals not of length one.

View File

@@ -500,9 +500,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')