From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20061 invoked by alias); 13 Apr 2010 15:17:29 -0000 Received: (qmail 20051 invoked by uid 22791); 13 Apr 2010 15:17:28 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,MSGID_MULTIPLE_AT,TW_LR X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Apr 2010 15:17:21 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o3DFGrKq021491 ; Tue, 13 Apr 2010 17:16:53 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o3DFGq22000589 ; Tue, 13 Apr 2010 17:16:52 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o3DFGpro045303 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Tue, 13 Apr 2010 17:16:52 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Joel Brobecker'" Cc: "'Pedro Alves'" , References: <003001cadae7$2e639860$8b2ac920$@muller@ics-cnrs.unistra.fr> <201004131237.53420.pedro@codesourcery.com> <004201cadb02$b4a525e0$1def71a0$@muller@ics-cnrs.unistra.fr> <20100413150707.GE19194@adacore.com> In-Reply-To: <20100413150707.GE19194@adacore.com> Subject: RE: [RFA] Fix compilation failure on cygwin due to ncurses macro. Date: Tue, 13 Apr 2010 15:17:00 -0000 Message-ID: <004e01cadb1c$5ea1cdf0$1be569d0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00406.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Joel Brobecker > Envoy=E9=A0: Tuesday, April 13, 2010 5:07 PM > =C0=A0: Pierre Muller > Cc=A0: 'Pedro Alves'; gdb-patches@sourceware.org > Objet=A0: Re: [RFA] Fix compilation failure on cygwin due to ncurses > macro. >=20 > > Committed with your corrections. >=20 > 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D 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);