This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix compile time warning in bfd/xsym.c
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 11 Feb 2005 17:32:34 +0000
- Subject: Fix compile time warning in bfd/xsym.c
Hi Guys,
I am applying the patch below to fix a compile time warning building
bfd/xsym.c. The problem was a call to memcpy() with a size of 0.
It was not exactly clear from the code if this was intentional or a
coding bug, so I chose to assume that the code was correct. This
may need to be revisited one day.
Cheers
Nick
bfd/ChangeLog
2005-02-11 Nick Clifton <nickc@redhat.com>
* xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
Avoid call to memcpy with a size of 0.
Index: bfd/xsym.c
===================================================================
RCS file: /cvs/src/src/bfd/xsym.c,v
retrieving revision 1.10
diff -c -3 -p -r1.10 xsym.c
*** bfd/xsym.c 31 Jan 2005 23:13:30 -0000 1.10
--- bfd/xsym.c 11 Feb 2005 17:19:00 -0000
*************** bfd_sym_parse_contained_variables_table_
*** 464,470 ****
--- 464,472 ----
}
else if (entry->entry.la_size <= BFD_SYM_CVTE_SCA)
{
+ #if BFD_SYM_CVTE_SCA > 0
memcpy (&entry->entry.address.lastruct.la, buf + 10, BFD_SYM_CVTE_SCA);
+ #endif
entry->entry.address.lastruct.la_kind = buf[23];
}
else if (entry->entry.la_size == BFD_SYM_CVTE_BIG_LA)