Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Mark Wielaard <mjw@redhat.com>, Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix GCC6 -Wmisleading-indentation issues.
Date: Mon, 25 Jan 2016 22:24:00 -0000	[thread overview]
Message-ID: <56A6A0AD.1090901@redhat.com> (raw)
In-Reply-To: <20160125221411.GA2721@blokker.redhat.com>

On 01/25/2016 10:14 PM, Mark Wielaard wrote:
> On Mon, Jan 25, 2016 at 04:46:10PM -0500, Simon Marchi wrote:

>> 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.

Yeah...  It was part being lazy and port not wanting to mess git blame for
such old code much.  There's an easy way around it though.  Add an
else, like:

  if (tinfo->run_terminal != NULL || gdb_has_a_terminal () == 0)
    return;
+ else
    {

Or, reverse the condition, like:

-  if (tinfo->run_terminal != NULL || gdb_has_a_terminal () == 0)
-    return;
+  if (tinfo->run_terminal == NULL && gdb_has_a_terminal ())
    {

Thanks,
Pedro Alves


  reply	other threads:[~2016-01-25 22:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 19:41 Mark Wielaard
2016-01-25 21:46 ` Simon Marchi
2016-01-25 22:14   ` Mark Wielaard
2016-01-25 22:24     ` Pedro Alves [this message]
2016-01-25 22:38       ` Mark Wielaard
2016-01-25 23:00         ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A6A0AD.1090901@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mjw@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox