This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix GCC6 -Wmisleading-indentation issues.
- From: Mark Wielaard <mjw at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 25 Jan 2016 23:14:11 +0100
- Subject: Re: [PATCH] Fix GCC6 -Wmisleading-indentation issues.
- Authentication-results: sourceware.org; auth=none
- References: <1453750851-29990-1-git-send-email-mjw at redhat dot com> <56A697A2 dot 9060207 at ericsson dot com>
On Mon, Jan 25, 2016 at 04:46:10PM -0500, Simon Marchi wrote:
> If you feel like it, you could build with --enable-targets=all to
> enable more code.
> You'll find more of these.
Thanks, but honestly this was just inspired by my desire to get
a local build with gcc6 going. It would be good to build more code
with GCC6 of course. I am sure it will find interesting issues.
> One little comment below, otherwise it LGTM (without implying that my voice is
> worth anything).
>
> > diff --git a/gdb/inflow.c b/gdb/inflow.c
> > index bbd2b12..d1dd41c 100644
> > --- a/gdb/inflow.c
> > +++ b/gdb/inflow.c
> > @@ -413,7 +413,7 @@ child_terminal_ours_1 (int output_only)
> > if (tinfo->run_terminal != NULL || gdb_has_a_terminal () == 0)
> > return;
> >
> > - {
> > + {
> > #ifdef SIGTTOU
> > /* Ignore this signal since it will happen when we try to set the
> > pgrp. */
> > @@ -497,7 +497,7 @@ child_terminal_ours_1 (int output_only)
> > result = fcntl (0, F_SETFL, our_terminal_info.tflags);
> > result = fcntl (0, F_SETFL, our_terminal_info.tflags);
> > #endif
> > - }
> > + }
>
> Shouldn't the code inside the brackets be de-indented too?
Possibly. Or remove the whole block and move stuff into the outer scope
now that it isn't strictly needed. But both create lots of code movement
because of the peculiar ifdefs in this code. And it clearly wasn't the
intention of the original author that removed the if statement in
commit d9d2d8b.
Thanks,
Mark