This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: FYI: fix uninitialized variable in converts.cc test
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 23 Jan 2013 13:32:33 -0700
- Subject: Re: FYI: fix uninitialized variable in converts.cc test
- References: <878v7jve0y.fsf@fleche.redhat.com>
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> * gdb.cp/converts.cc (main): Initialize 'a'.
Oops, I mailed out a the non-working patch.
Here's the one I am actually committing.
Tom
Index: gdb.cp/converts.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/converts.cc,v
retrieving revision 1.7
diff -u -r1.7 converts.cc
--- gdb.cp/converts.cc 16 Sep 2012 17:30:48 -0000 1.7
+++ gdb.cp/converts.cc 23 Jan 2013 20:31:41 -0000
@@ -53,7 +53,8 @@
//foo0_3(bppp); // Pointer-to-pointer-to-pointer base.
foo0_3((A***)bppp); // to ensure that the function is emitted.
- char *a; // pointer to..
+ char av = 'a';
+ char *a = &av; // pointer to..
B *bp;
foo1_1 (a); // ..pointer
foo1_2 (a); // ..array