This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH, libiberty: silence warning
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ian Lance Taylor <ian at airs dot com>
- Date: Thu, 18 Dec 2008 15:45:31 +1100
- Subject: PATCH, libiberty: silence warning
This patch silences a warning about a potentially uninitialised variable
when compiling cp-demangle.c. This is arguably a weakness of my build
system compiler, but I don't see any harm in initialising it.
Okay for the trunk?
2008-12-18 Ben Elliston <bje@auibm.com>
* cp-demangle.c (cplus_demangle_type): Initialise ret.
Index: cp-demangle.c
===================================================================
--- cp-demangle.c (revision 142805)
+++ cp-demangle.c (working copy)
@@ -1911,7 +1911,7 @@
cplus_demangle_type (struct d_info *di)
{
char peek;
- struct demangle_component *ret;
+ struct demangle_component *ret = NULL;
int can_subst;
/* The ABI specifies that when CV-qualifiers are used, the base type