From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: "'Pedro Alves'" <pedro@codesourcery.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFA] Fix compilation failure on cygwin due to ncurses macro.
Date: Tue, 13 Apr 2010 15:17:00 -0000 [thread overview]
Message-ID: <004e01cadb1c$5ea1cdf0$1be569d0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20100413150707.GE19194@adacore.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Tuesday, April 13, 2010 5:07 PM
> À : Pierre Muller
> Cc : 'Pedro Alves'; gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix compilation failure on cygwin due to ncurses
> macro.
>
> > Committed with your corrections.
>
> Just a request: Can you add a comment next to all the casts explaining
> why the cast is there? It's important so that someone seeing the cast
> does not scratch his head for too long...
Would this change be OK?
Any better description is equally OK for me...
Does it deserve a separate ChangeLog entry, or should I commit it
without ChangeLog entry?
Pierre
$ cvs diff -u -p tui/tui-regs.c tui/tui-stack.c
Index: tui/tui-regs.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-regs.c,v
retrieving revision 1.37
diff -u -p -r1.37 tui-regs.c
--- tui/tui-regs.c 13 Apr 2010 12:11:09 -0000 1.37
+++ tui/tui-regs.c 13 Apr 2010 15:14:58 -0000
@@ -541,6 +541,8 @@ tui_display_register (struct tui_data_el
int i;
if (data->highlight)
+ /* Typecast to void is needed because some ncurses macros expand to
code
+ generating a warning about an unused value otherwise. */
(void) wstandout (win_info->handle);
wmove (win_info->handle, 0, 0);
@@ -551,6 +553,8 @@ tui_display_register (struct tui_data_el
waddstr (win_info->handle, data->content);
if (data->highlight)
+ /* Typecast to void is needed because some ncurses macros expand to
code
+ generating a warning about an unused value otherwise. */
(void) wstandend (win_info->handle);
tui_refresh_win (win_info);
}
Index: tui/tui-stack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-stack.c,v
retrieving revision 1.35
diff -u -p -r1.35 tui-stack.c
--- tui/tui-stack.c 13 Apr 2010 12:11:10 -0000 1.35
+++ tui/tui-stack.c 13 Apr 2010 15:14:58 -0000
@@ -256,9 +256,13 @@ tui_show_locator_content (void)
string = tui_make_status_line (&element->which_element.locator);
wmove (locator->handle, 0, 0);
+ /* Typecast to void is needed because some ncurses macros expand to
code
+ generating a warning about an unused value otherwise. */
(void) wstandout (locator->handle);
waddstr (locator->handle, string);
wclrtoeol (locator->handle);
+ /* Typecast to void is needed because some ncurses macros expand to
code
+ generating a warning about an unused value otherwise. */
(void) wstandend (locator->handle);
tui_refresh_win (locator);
wmove (locator->handle, 0, 0);
next prev parent reply other threads:[~2010-04-13 15:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 8:56 Pierre Muller
2010-04-13 11:38 ` Pedro Alves
2010-04-13 12:13 ` Pierre Muller
2010-04-13 15:07 ` Joel Brobecker
2010-04-13 15:17 ` Pierre Muller [this message]
2010-04-13 15:26 ` Joel Brobecker
2010-04-14 11:08 ` Pierre Muller
2010-04-14 16:00 ` Joel Brobecker
2010-04-14 16:30 ` Pierre Muller
2010-04-14 16:33 ` Joel Brobecker
2010-04-14 16:39 ` Pedro Alves
2010-04-15 8:09 ` Pierre Muller
2010-04-15 15:53 ` Joel Brobecker
2010-04-15 22:38 ` [RFC] Use macro for void typecast necessary for ncurses library Pierre Muller
2010-04-16 4:36 ` Joel Brobecker
[not found] ` <9120.2086922296$1271371097@news.gmane.org>
2010-04-20 15:45 ` Tom Tromey
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='004e01cadb1c$5ea1cdf0$1be569d0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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