This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Add missing initialization in pretty-printer
- From: Ziemowit Laski <zlaski at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 12 Sep 2003 15:44:29 -0700
- Subject: Add missing initialization in pretty-printer
I discovered this in the objc-improvements-branch, where I was seeing
mysterious DejaGNU failures, though only on Darwin :-(.
I will commit this as _painfully_ obvious unless someone screams.
--Zem
2003-09-12 Ziemowit Laski <zlaski@apple.com>
* pretty-print.c (pp_construct): Wipe pp->buffer clean after
allocating storage for it.
Index: gcc/pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/pretty-print.c,v
retrieving revision 2.5
diff -c -3 -p -r2.5 pretty-print.c
*** gcc/pretty-print.c 19 Aug 2003 23:21:59 -0000 2.5
--- gcc/pretty-print.c 12 Sep 2003 22:36:38 -0000
*************** pp_construct (pretty_printer *pp, const
*** 423,428 ****
--- 423,429 ----
{
memset (pp, 0, sizeof (pretty_printer));
pp->buffer = xmalloc (sizeof (output_buffer));
+ memset (pp->buffer, 0, sizeof (output_buffer));
obstack_init (&pp->buffer->obstack);
pp->buffer->stream = stderr;
pp_line_cutoff (pp) = maximum_length;
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477