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]

Obvious fix for an uninitialized variable bug.


No wonder I was getting spurious gdb669.exp failures...

Sorry about that.  Fixed with the patch below.

-- 
Pedro Alves

2009-05-29  Pedro Alves  <pedro@codesourcery.com>

	* mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.

---
 gdb/mi/mi-interp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: src/gdb/mi/mi-interp.c
===================================================================
--- src.orig/gdb/mi/mi-interp.c	2009-05-29 20:02:29.000000000 +0100
+++ src/gdb/mi/mi-interp.c	2009-05-29 20:02:46.000000000 +0100
@@ -447,7 +447,7 @@ mi_on_resume (ptid_t ptid)
     fprintf_unfiltered (raw_stdout, "*running,thread-id=\"all\"\n");
   else if (ptid_is_pid (ptid))
     {
-      int count;
+      int count = 0;
 
       /* Backwards compatibility.  If there's only one inferior,
 	 output "all", otherwise, output each resumed thread


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