* Re: uninitialized variables
[not found] <4C8C21C0.3050209@gmail.com>
@ 2010-10-25 8:24 ` Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2010-10-25 8:24 UTC (permalink / raw)
To: Lucas Clemente Vella; +Cc: binutils
On Sat, Sep 11, 2010 at 09:41:36PM -0300, Lucas Clemente Vella wrote:
> These uninitialized variables in bfd/elf32-arm.c caused the compilation
> to fail with -Werror (the default) and -O3 (my choice)
[snip patch]
Thanks for the report. I have applied this patch instead.
* elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
var warning at -O3.
Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.245
diff -u -p -r1.245 elf32-arm.c
--- bfd/elf32-arm.c 11 Oct 2010 07:38:53 -0000 1.245
+++ bfd/elf32-arm.c 25 Oct 2010 06:28:27 -0000
@@ -3704,7 +3704,12 @@ find_stub_size_and_template (enum elf32_
unsigned int size;
template_sequence = stub_definitions[stub_type].template_sequence;
+ if (stub_template)
+ *stub_template = template_sequence;
+
template_size = stub_definitions[stub_type].template_size;
+ if (stub_template_size)
+ *stub_template_size = template_size;
size = 0;
for (i = 0; i < template_size; i++)
@@ -3723,16 +3728,10 @@ find_stub_size_and_template (enum elf32_
default:
BFD_FAIL ();
- return FALSE;
+ return 0;
}
}
- if (stub_template)
- *stub_template = template_sequence;
-
- if (stub_template_size)
- *stub_template_size = template_size;
-
return size;
}
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-25 8:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4C8C21C0.3050209@gmail.com>
2010-10-25 8:24 ` uninitialized variables Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).