This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix warnings about unused variables
- To: Andreas Jaeger <aj at suse dot de>, gcc-patches at gcc dot gnu dot org
- Subject: Re: Fix warnings about unused variables
- From: Graham Stott <grahams at redhat dot com>
- Date: Mon, 16 Jul 2001 18:58:23 +0100
- References: <hor8vhm4v8.fsf@gee.suse.de>
Andreas Jaeger wrote:
>
> The appended patch avoids two warnings about unused variables.
>
> Bootstrapped and testsuite run on i686-linux.
>
> Ok to commit?
> Andreas
>
> 2001-07-16 Andreas Jaeger <aj@suse.de>
>
> * lcm.c (optimize_mode_switching): Avoid warning for unused
> variable if !NORMAL_MODE
>
> * flow.c (try_crossjump_to_edge): Remove unused variable.
>
> ============================================================
> Index: gcc/lcm.c
> --- gcc/lcm.c 2001/07/11 16:11:47 1.24
> +++ gcc/lcm.c 2001/07/16 09:47:49
> @@ -1013,7 +1013,9 @@ optimize_mode_switching (file)
> {
> rtx insn;
> int bb, e;
> +#ifdef NORMAL_MODE
> edge eg;
> +#endif
> int need_commit = 0;
> sbitmap *kill;
> struct edge_list *edge_list;
I think it would be better to move the declaration into the block
where it is used to avoid yet another conditional block.
Graham