From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [OB] remote.c: initialize p to handle build error
Date: Thu, 14 Jul 2011 06:22:00 -0000 [thread overview]
Message-ID: <CANFwon2Y88zUiuDk8hSfPu9m0UxUhv4oL1YE9LwmXW+xGAgX5A@mail.gmail.com> (raw)
gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/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=1 -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 ‘remote_get_trace_status’:
../../src/gdb/remote.c:10045:9: error: ‘p’ may be used uninitialized
in this function
Checked in a patch to fix it.
Thanks,
Hui
2011-07-14 Hui Zhu <teawater@gmail.com>
* remote.c (remote_get_trace_status): Initialize p.
===================================================================
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 = NULL;
/* FIXME we need to get register block size some other way. */
extern int trace_regblock_size;
volatile struct gdb_exception ex;
next reply other threads:[~2011-07-14 4:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 6:22 Hui Zhu [this message]
2011-07-14 15:57 ` Jan Kratochvil
2011-07-15 9:03 ` Hui Zhu
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=CANFwon2Y88zUiuDk8hSfPu9m0UxUhv4oL1YE9LwmXW+xGAgX5A@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb-patches@sourceware.org \
/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