This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fix warnings about unused variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]