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]

ldfile.c uninit warning


Another -O3 warning saying sysrooted may be used uninitialized.
In this case, I think the problem would disappear if gcc could know
that einfo with %F doesn't return.  So give gcc a little help.

	* ldfile.c (ldfile_open_command_file_1): Return after einfo
	to avoid warning.

Index: ld/ldfile.c
===================================================================
RCS file: /cvs/src/src/ld/ldfile.c,v
retrieving revision 1.67
diff -u -p -r1.67 ldfile.c
--- ld/ldfile.c	13 Jul 2012 13:20:26 -0000	1.67
+++ ld/ldfile.c	6 Mar 2013 09:51:12 -0000
@@ -602,6 +602,7 @@ ldfile_open_command_file_1 (const char *
     {
       bfd_set_error (bfd_error_system_call);
       einfo (_("%P%F: cannot open linker script file %s: %E\n"), name);
+      return;
     }
 
   lex_push_file (ldlex_input_stack, name, sysrooted);

-- 
Alan Modra
Australia Development Lab, IBM


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