This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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] bfd - fix warning


I see the follwing warning (building with GCC-4.4):

peigen.c: In function '_bfd_pei_swap_sym_in':
peigen.c:133: error: 'name' may be used uninitialized in this function
make[3]: *** [peigen.lo] Error 1

  Matthias
bfd/

	* bfd/peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.

--- bfd/peXXigen.c.orig	2009-04-23 11:12:58.000000000 +0000
+++ bfd/peXXigen.c	2009-04-23 11:10:41.000000000 +0000
@@ -130,7 +130,7 @@
   if (in->n_sclass == C_SECTION)
     {
       char namebuf[SYMNMLEN + 1];
-      const char *name;
+      const char *name = NULL;
 
       in->n_value = 0x0;
 

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