From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19004 invoked by alias); 8 Feb 2013 12:53:02 -0000 Received: (qmail 18995 invoked by uid 22791); 8 Feb 2013 12:53:01 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Feb 2013 12:52:47 +0000 Received: from md13.u-strasbg.fr (md13.u-strasbg.fr [130.79.200.248]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r18CqhSR059237 ; Fri, 8 Feb 2013 13:52:43 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms12.u-strasbg.fr [130.79.204.112]) by md13.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r18Cqhe9007534 ; Fri, 8 Feb 2013 13:52:43 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id r18CqgZi002530 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 8 Feb 2013 13:52:43 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Matthew Gretton-Dann'" , Cc: "'Patch Tracking'" References: <5114EB2A.9040007@linaro.org> In-Reply-To: <5114EB2A.9040007@linaro.org> Subject: RE: [RFA] Fix uninitialised variable warning error in gdb/stack.c Date: Fri, 08 Feb 2013 12:53:00 -0000 Message-ID: <002401ce05fb$2f152c50$8d3f84f0$@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: 2013-02/txt/msg00210.txt.bz2 Hi Matt, I stumbled over the same error... But didn't get the time to fix it myself. Such kind of small fixes that restore a successful compilation broken by a commit can be considered as obvious fixes. I would have committed the change as such and would have simply sent the patch after committing with [OBVIOUS] in front. So, this means that I can also give you=20 an approval for that obvious change! Pierre Muller > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Matthew Gretton-Dann > Envoy=E9=A0: vendredi 8 f=E9vrier 2013 13:10 > =C0=A0: gdb-patches@sourceware.org > Cc=A0: Patch Tracking > Objet=A0: [RFA] Fix uninitialised variable warning error in gdb/stack.c >=20 > All, >=20 > When compiling GDB with GCC 4.5 and earlier I am getting the following > uninitialized variable warning: >=20 > /work/sources/gdb/stack.c: In function 'return_command': > /work/sources/gdb/stack.c:2281: error: 'rv_conv' may be used uninitialized > in this function > make[1]: *** [stack.o] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make[1]: Leaving directory `/work/builds/common/gdb' >=20 > The attached patch fixes this issue by initializing rv_conv when it is > declared. The value used to initialise rv_conv is chosen so that if the > code changes in the future and rv_conv really should be uninitialized then > the gdb_assert around line 2385 will trigger. >=20 > OK for trunk? Tested on x86_64-none-linux-gnu >=20 > gdb/ChangeLog: >=20 > 2013-02-08 Matthew Gretton-Dann >=20 > * stack.c (return_command): Work around uninitialized variable > warning. >=20 > Thanks, >=20 > Matt >=20 > -- > Matthew Gretton-Dann > Toolchain Working Group, Linaro