[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix a --enable-gcc-warnings problem.
From: |
Alex Rozenman |
Subject: |
Re: [PATCH] Fix a --enable-gcc-warnings problem. |
Date: |
Fri, 31 Jul 2009 22:47:24 +0300 |
Hello Joel,
I fixed errors belonging to my part of the code. There is still one
remaining error:
"src/scan-code.c:1759: warning: 'input' defined but not used"
It's causing error in -Werror mode and the build is failed. I removed
-Werror and checked that in the master branch it's only remaining issue. In
branch-2.5 there are couple of warnings, for example:
../../branch-2.5/lib/subpipe.c:134: warning: cast discards qualifiers from
pointer target type
../../branch-2.5/lib/hash.c:931: warning: cast discards qualifiers from
pointer target type
I pushed the attached commit to master and branch-2.5
Alex
On Wed, Jul 29, 2009 at 9:08 PM, Joel E. Denny <address@hidden> wrote:
> I pushed this to branch-2.5 and master.
>
> Alex, would you please build Bison with "./configure
> --enable-gcc-warnings" and fix the remaining errors? You're missing void
> on a couple of function prototypes, and you're disobeying -Wshadow in many
> places. The latter, at least, is part of the GNU coding standards.
> Thanks.
>
> >From a1ed2b71faac0de1db1c0e279ee3203115ec70d8 Mon Sep 17 00:00:00 2001
> From: Joel E. Denny <address@hidden>
> Date: Wed, 29 Jul 2009 13:47:02 -0400
> Subject: [PATCH] Fix a --enable-gcc-warnings problem.
>
> * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
> variable.
>
> diff --git a/src/scan-gram.l b/src/scan-gram.l
> index 0c12cba..422eae6 100644
> --- a/src/scan-gram.l
> +++ b/src/scan-gram.l
> @@ -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')
> --
> 1.5.4.3
>
>
--
Best regards,
Alex Rozenman (address@hidden).
ba4184ec9152422c14be743e876b5716daf0aa80.txt
Description: Text document