This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH/obvious] Initialize variable on gdbserver/tracepoint.c:cmd_qtv
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Date: Thu, 14 Mar 2013 08:47:03 -0300
- Subject: [PATCH/obvious] Initialize variable on gdbserver/tracepoint.c:cmd_qtv
While compiling CVS HEAD to test my previous commit using -O2, I found
that GCC was complaining about `val' being uninitialized on
gdb/gdbserver/tracepoint.c:cmd_qtv. I committed this obvious patch to
initialize it to zero (harmless).
--
Sergio
2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
* tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
compiler warning.
Index: gdb/gdbserver/tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/tracepoint.c,v
retrieving revision 1.75
diff -u -r1.75 tracepoint.c
--- gdb/gdbserver/tracepoint.c 13 Mar 2013 03:40:26 -0000 1.75
+++ gdb/gdbserver/tracepoint.c 14 Mar 2013 11:38:15 -0000
@@ -2804,7 +2804,7 @@
cmd_qtv (char *own_buf)
{
ULONGEST num;
- LONGEST val;
+ LONGEST val = 0;
int err;
char *packet = own_buf;