This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
clang build-regression [Re: [PATCH 58/61] Change make_invisible_and_set_new_height to be a method]
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 22 Jul 2019 13:57:49 +0200
- Subject: clang build-regression [Re: [PATCH 58/61] Change make_invisible_and_set_new_height to be a method]
- References: <20190704170311.15982-1-tom@tromey.com> <20190704170311.15982-59-tom@tromey.com>
On Thu, 04 Jul 2019 19:03:08 +0200, Tom Tromey wrote:
> @@ -1243,24 +1237,22 @@ tui_source_window_base::set_new_height (int height)
> }
> }
>
> -/* Function make the target window (and auxiliary windows associated
> - with the targer) invisible, and set the new height and
> - location. */
> -static void
> -make_invisible_and_set_new_height (struct tui_win_info *win_info,
> - int height)
> +/* See tui-data.h. */
> +
> +void
> +tui_win_info::make_invisible_and_set_new_height (int height)
> {
> - win_info->make_visible (false);
> - win_info->height = height;
> + make_visible (false);
> + height = height;
clang-8.0.0-1.fc30.x86_64
../../gdb-master/gdb/tui/tui-win.c:1200:10: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign]
height = height;
~~~~~~ ^ ~~~~~~
> if (height > 1)
> - win_info->viewport_height = height - 1;
> + viewport_height = height - 1;
> else
> - win_info->viewport_height = height;
> - if (win_info != TUI_CMD_WIN)
> - win_info->viewport_height--;
> + viewport_height = height;
> + if (this != TUI_CMD_WIN)
> + viewport_height--;
>
> /* Now deal with the auxiliary windows associated with win_info. */
> - win_info->set_new_height (height);
> + set_new_height (height);
> }
Jan