From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13504 invoked by alias); 5 Oct 2008 16:41:14 -0000 Received: (qmail 13495 invoked by uid 22791); 5 Oct 2008 16:41:14 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 05 Oct 2008 16:40:39 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m95GeVMl019894 for ; Sun, 5 Oct 2008 12:40:31 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m95GeU5R010922; Sun, 5 Oct 2008 12:40:30 -0400 Received: from opsy.redhat.com (vpn-10-4.bos.redhat.com [10.16.10.4]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m95GeTlY009211; Sun, 5 Oct 2008 12:40:30 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 7153C3784EC; Sun, 5 Oct 2008 10:38:47 -0600 (MDT) To: Gcc Patch List Subject: [gcc-in-cxx] FYI: initialize consts From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Sun, 05 Oct 2008 17:08:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg00143.txt.bz2 I'm checking this in on the gcc-in-cxx branch. g++ was complaining about uninitialized consts. This patch fixes the two instances of that error. Tom ChangeLog: 2008-10-05 Tom Tromey * sdbout.c (sdb_debug_hooks): Initialize. * ggc-page.c (ggc_pch_write_object): Initialize emptyBytes. Index: sdbout.c =================================================================== --- sdbout.c (revision 140884) +++ sdbout.c (working copy) @@ -1,6 +1,6 @@ /* Output sdb-format symbol table information from GNU compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -1687,7 +1687,35 @@ #else /* SDB_DEBUGGING_INFO */ /* This should never be used, but its address is needed for comparisons. */ -const struct gcc_debug_hooks sdb_debug_hooks; +const struct gcc_debug_hooks sdb_debug_hooks = +{ + 0, /* init */ + 0, /* finish */ + 0, /* define */ + 0, /* undef */ + 0, /* start_source_file */ + 0, /* end_source_file */ + 0, /* begin_block */ + 0, /* end_block */ + 0, /* ignore_block */ + 0, /* source_line */ + 0, /* begin_prologue */ + 0, /* end_prologue */ + 0, /* end_epilogue */ + 0, /* begin_function */ + 0, /* end_function */ + 0, /* function_decl */ + 0, /* global_decl */ + 0, /* type_decl */ + 0, /* imported_module_or_decl */ + 0, /* deferred_inline_function */ + 0, /* outlining_inline_function */ + 0, /* label */ + 0, /* handle_pch */ + 0, /* var_location */ + 0, /* switch_text_section */ + 0 /* start_end_main_source_file */ +}; #endif /* SDB_DEBUGGING_INFO */ Index: ggc-page.c =================================================================== --- ggc-page.c (revision 140884) +++ ggc-page.c (working copy) @@ -2160,7 +2160,7 @@ size_t size, bool is_string ATTRIBUTE_UNUSED) { unsigned order; - static const char emptyBytes[256]; + static const char emptyBytes[256] = { 0 }; if (size < NUM_SIZE_LOOKUP) order = size_lookup[size];