From: brobecke Date: Fri, 16 Apr 2010 04:34:30 +0000 (+0000) Subject: * tui/tui-regs.c (tui_display_register): Add comment about X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8972aef8267aa3895f2f0160408f82387fb561fe;p=pf3gnuchains%2Fpf3gnuchains4x.git * tui/tui-regs.c (tui_display_register): Add comment about a couple of casts. * tui/tui-stack.c (tui_show_locator_content): Ditto. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0a8f5b1c78..7c2ec949ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-04-16 Joel Brobecker + + * tui/tui-regs.c (tui_display_register): Add comment about + a couple of casts. + * tui/tui-stack.c (tui_show_locator_content): Ditto. + 2010-04-15 Stan Shebs * frame.c: Include tracepoint.h. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 8cbd338aae..a339beadc6 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -541,6 +541,11 @@ tui_display_register (struct tui_data_element *data, int i; if (data->highlight) + /* We ignore the return value, casting it to void in order to avoid + a compiler warning. The warning itself was introduced by a patch + to ncurses 5.7 dated 2009-08-29, changing this macro to expand + to code that causes the compiler to generate an unused-value + warning. */ (void) wstandout (win_info->handle); wmove (win_info->handle, 0, 0); @@ -551,6 +556,11 @@ tui_display_register (struct tui_data_element *data, waddstr (win_info->handle, data->content); if (data->highlight) + /* We ignore the return value, casting it to void in order to avoid + a compiler warning. The warning itself was introduced by a patch + to ncurses 5.7 dated 2009-08-29, changing this macro to expand + to code that causes the compiler to generate an unused-value + warning. */ (void) wstandend (win_info->handle); tui_refresh_win (win_info); } diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c index 1630beaa59..d6b514d1d2 100644 --- a/gdb/tui/tui-stack.c +++ b/gdb/tui/tui-stack.c @@ -256,6 +256,11 @@ tui_show_locator_content (void) string = tui_make_status_line (&element->which_element.locator); wmove (locator->handle, 0, 0); + /* We ignore the return value from wstandout and wstandend, casting + them to void in order to avoid a compiler warning. The warning + itself was introduced by a patch to ncurses 5.7 dated 2009-08-29, + changing these macro to expand to code that causes the compiler + to generate an unused-value warning. */ (void) wstandout (locator->handle); waddstr (locator->handle, string); wclrtoeol (locator->handle);