This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]