public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove self-assign from make_invisible_and_set_new_height
Date: Mon, 22 Jul 2019 14:37:00 -0000	[thread overview]
Message-ID: <20190722143718.115620.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bfa2a36d94d124eb7b54fd271a543047579b47ee

commit bfa2a36d94d124eb7b54fd271a543047579b47ee
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Jul 22 08:34:25 2019 -0600

    Remove self-assign from make_invisible_and_set_new_height
    
    In https://sourceware.org/ml/gdb-patches/2019-07/msg00509.html, Jan
    pointed out that clang points out that
    make_invisible_and_set_new_height self-assigns "height".
    
    This patch fixes the bug by renaming the formal parameter.
    
    gdb/ChangeLog
    2019-07-22  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-win.c (tui_win_info::make_invisible_and_set_new_height):
    	Don't self-assign.

Diff:
---
 gdb/ChangeLog     | 5 +++++
 gdb/tui/tui-win.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 63d6712..bf12f0e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-22  Tom Tromey  <tom@tromey.com>
+
+	* tui/tui-win.c (tui_win_info::make_invisible_and_set_new_height):
+	Don't self-assign.
+
 2019-07-22  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* c-typeprint.c (c_print_typedef): Pass -1 instead of 0 to
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index db4dc10..785c623 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1194,10 +1194,10 @@ tui_adjust_win_heights (struct tui_win_info *primary_win_info,
 /* See tui-data.h.  */
 
 void
-tui_win_info::make_invisible_and_set_new_height (int height)
+tui_win_info::make_invisible_and_set_new_height (int height_)
 {
   make_visible (false);
-  height = height;
+  height = height_;
   if (height > 1)
     viewport_height = height - 1;
   else


                 reply	other threads:[~2019-07-22 14:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190722143718.115620.qmail@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).