aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-10-25 08:23:24 +0000
committerAlan Modra <amodra@gmail.com>2010-10-25 08:23:24 +0000
commit2a2294071c2330ec46f0fb3dc35aad9ae306abd8 (patch)
treea92eb62875159e4b14828b7f31b1e680d66804c9 /bfd
parent59a9808d562f9b79249a16345b18c01f5a54342a (diff)
downloadgdb-2a2294071c2330ec46f0fb3dc35aad9ae306abd8.zip
gdb-2a2294071c2330ec46f0fb3dc35aad9ae306abd8.tar.gz
gdb-2a2294071c2330ec46f0fb3dc35aad9ae306abd8.tar.bz2
* elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
var warning at -O3.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-arm.c13
2 files changed, 11 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7017b15..dcebb3b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2010-10-25 Alan Modra <amodra@gmail.com>
+ * elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
+ var warning at -O3.
+
+2010-10-25 Alan Modra <amodra@gmail.com>
+
* opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal.
* libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here.
* libbfd.h: Regenerate
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 9fce4b0..739a79d 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -3704,7 +3704,12 @@ find_stub_size_and_template (enum elf32_arm_stub_type stub_type,
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_arm_stub_type stub_type,
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;
}