summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2012-10-18 06:53:16 +0000
committerKai Tietz <kai.tietz@onevision.com>2012-10-18 06:53:16 +0000
commit4ad3b7ef02a26744c4f648411537e240274999fe (patch)
tree2fd905b267991a0bd340248bc6d3789b3d2626aa
parent70e0ee1a27389a69a4d26ded71dc70201e4d4a33 (diff)
downloadppe42-binutils-4ad3b7ef02a26744c4f648411537e240274999fe.tar.gz
ppe42-binutils-4ad3b7ef02a26744c4f648411537e240274999fe.zip
* aarch64-asm.c (aarch64_ins_ldst_reglist): Initialize
value with a default. (do_special_encoding): Likewise. (aarch64_ins_ldst_elemlist): Pre-initialize QSsize, and opcodeh2 variables with default. * arc-dis.c (write_comments_): Don't use strncat due size of state->commentBuffer pointer isn't predictable.
-rw-r--r--opcodes/ChangeLog10
-rw-r--r--opcodes/aarch64-asm.c10
-rw-r--r--opcodes/arc-dis.c3
3 files changed, 16 insertions, 7 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 398ae6f16b..5cfc642a48 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,13 @@
+2012-10-18 Kai Tietz <ktietz@redhat.com>
+
+ * aarch64-asm.c (aarch64_ins_ldst_reglist): Initialize
+ value with a default.
+ (do_special_encoding): Likewise.
+ (aarch64_ins_ldst_elemlist): Pre-initialize QSsize, and opcodeh2
+ variables with default.
+ * arc-dis.c (write_comments_): Don't use strncat due
+ size of state->commentBuffer pointer isn't predictable.
+
2012-10-15 Yufeng Zhang <yufeng.zhang@arm.com>
* aarch64-opc.c (aarch64_sys_regs): Add rmr_el1, rmr_el2 and
diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c
index 006b075de2..3a6e7b11d9 100644
--- a/opcodes/aarch64-asm.c
+++ b/opcodes/aarch64-asm.c
@@ -146,7 +146,7 @@ aarch64_ins_ldst_reglist (const aarch64_operand *self ATTRIBUTE_UNUSED,
const aarch64_opnd_info *info, aarch64_insn *code,
const aarch64_inst *inst)
{
- aarch64_insn value;
+ aarch64_insn value = 0;
/* Number of elements in each structure to be loaded/stored. */
unsigned num = get_opcode_dependent_value (inst->opcode);
@@ -215,8 +215,8 @@ aarch64_ins_ldst_elemlist (const aarch64_operand *self ATTRIBUTE_UNUSED,
const aarch64_inst *inst ATTRIBUTE_UNUSED)
{
aarch64_field field = {0, 0};
- aarch64_insn QSsize; /* fields Q:S:size. */
- aarch64_insn opcodeh2; /* opcode<2:1> */
+ aarch64_insn QSsize = 0; /* fields Q:S:size. */
+ aarch64_insn opcodeh2 = 0; /* opcode<2:1> */
assert (info->reglist.has_index);
@@ -452,7 +452,7 @@ const char *
aarch64_ins_ft (const aarch64_operand *self, const aarch64_opnd_info *info,
aarch64_insn *code, const aarch64_inst *inst)
{
- aarch64_insn value;
+ aarch64_insn value = 0;
assert (info->idx == 0);
@@ -834,7 +834,7 @@ static void
do_special_encoding (struct aarch64_inst *inst)
{
int idx;
- aarch64_insn value;
+ aarch64_insn value = 0;
DEBUG_TRACE ("enter with coding 0x%x", (uint32_t) inst->value);
diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index 0e16cde239..df842fd7ca 100644
--- a/opcodes/arc-dis.c
+++ b/opcodes/arc-dis.c
@@ -426,8 +426,7 @@ write_comments_(struct arcDisState * state,
strcpy (state->commentBuffer, comment_prefix);
else
strcat (state->commentBuffer, ", ");
- strncat (state->commentBuffer, state->comm[i],
- sizeof (state->commentBuffer));
+ strcat (state->commentBuffer, state->comm[i]);
}
}
}
OpenPOWER on IntegriCloud