* Fix Compile Time Warning: opcodes/crx-dis.c
@ 2005-02-23 15:08 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2005-02-23 15:08 UTC (permalink / raw)
To: binutils
Hi Guys,
A simple case of a local structure being used without some of its
fields being initialised.
Cheers
Nick
opcodes/ChangeLog
2005-02-23 Nick Clifton <nickc@redhat.com>
* crx-dis.c (make_instruction): Move argument structure into inner
scope and ensure that all of its fields are initialised before
they are used.
Index: opcodes/crx-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/crx-dis.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 crx-dis.c
*** opcodes/crx-dis.c 5 Dec 2004 12:26:49 -0000 1.6
--- opcodes/crx-dis.c 23 Feb 2005 11:42:36 -0000
*************** make_instruction (void)
*** 655,664 ****
{
int i;
unsigned int shift;
- argument a;
for (i = 0; i < currInsn.nargs; i++)
{
a.type = getargtype (instruction->operands[i].op_type);
if (instruction->operands[i].op_type == cst4
|| instruction->operands[i].op_type == rbase_dispu4)
--- 655,665 ----
{
int i;
unsigned int shift;
for (i = 0; i < currInsn.nargs; i++)
{
+ argument a = { 0 };
+
a.type = getargtype (instruction->operands[i].op_type);
if (instruction->operands[i].op_type == cst4
|| instruction->operands[i].op_type == rbase_dispu4)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-23 11:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 15:08 Fix Compile Time Warning: opcodes/crx-dis.c Nick Clifton
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).