From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9764 invoked by alias); 14 Jul 2011 04:49:50 -0000 Received: (qmail 9754 invoked by uid 22791); 14 Jul 2011 04:49:49 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f54.google.com (HELO mail-fx0-f54.google.com) (209.85.161.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 04:49:35 +0000 Received: by fxe4 with SMTP id 4so325861fxe.13 for ; Wed, 13 Jul 2011 21:49:34 -0700 (PDT) Received: by 10.223.79.145 with SMTP id p17mr2848636fak.97.1310618974215; Wed, 13 Jul 2011 21:49:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.121.140 with HTTP; Wed, 13 Jul 2011 21:48:54 -0700 (PDT) From: Hui Zhu Date: Thu, 14 Jul 2011 06:22:00 -0000 Message-ID: Subject: [OB] remote.c: initialize p to handle build error To: gdb-patches ml Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-07/txt/msg00364.txt.bz2 gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR=3D"\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib -Ignulib -DTUI=3D1 -DGDBTK -I/usr/include/python2.6 -I/usr/include/python2.6 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Werror -c -o remote.o -MT remote.o -MMD -MP -MF .deps/remote.Tpo ../../src/gdb/remote.c cc1: warnings being treated as errors ../../src/gdb/remote.c: In function =91remote_get_trace_status=92: ../../src/gdb/remote.c:10045:9: error: =91p=92 may be used uninitialized in this function Checked in a patch to fix it. Thanks, Hui 2011-07-14 Hui Zhu * remote.c (remote_get_trace_status): Initialize p. =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/remote.c,v retrieving revision 1.455 retrieving revision 1.456 diff -u -r1.455 -r1.456 --- src/gdb/remote.c 2011/07/13 17:07:16 1.455 +++ src/gdb/remote.c 2011/07/14 04:46:42 1.456 @@ -10042,7 +10042,7 @@ static int remote_get_trace_status (struct trace_status *ts) { - char *p; + char *p =3D NULL; /* FIXME we need to get register block size some other way. */ extern int trace_regblock_size; volatile struct gdb_exception ex;