This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

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



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