This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[commit] Fix vms-tir.c gcc-3.4 compilation warning
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: binutils at sourceware dot org
- Date: Fri, 15 Jan 2010 22:41:26 +0100
- Subject: [commit] Fix vms-tir.c gcc-3.4 compilation warning
Hi,
checked-in as I do not find any risk possibility of this patch.
gcc-3.4.6-11.el4_8.1.x86_64 was producing:
vms-tir.c:2308: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
vms-tir.c:2313: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
The two function definitions there are:
static void
start_etir_record (bfd * abfd, int sec_index, uquad offset, bfd_boolean justoffset)
static void
sto_imm (bfd *abfd, bfd_size_type ssize, unsigned char *cptr, bfd_vma vaddr,
int sec_index, const char *name)
Regards,
Jan
http://sourceware.org/ml/binutils-cvs/2010-01/msg00159.html
--- src/bfd/ChangeLog 2010/01/13 22:30:53 1.4892
+++ src/bfd/ChangeLog 2010/01/15 21:38:15 1.4893
@@ -1,3 +1,9 @@
+2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix compilation warning on gcc-3.4.
+ * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
+ parameter index to sec_index according to the function definition.
+
2010-01-13 Chao-ying Fu <fu@mips.com>
* elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
--- src/bfd/vms-tir.c 2009/12/11 13:42:04 1.22
+++ src/bfd/vms-tir.c 2010/01/15 21:38:16 1.23
@@ -2305,12 +2305,12 @@
This is still under construction and therefore not documented. */
-static void start_etir_record (bfd *abfd, int index, uquad offset,
+static void start_etir_record (bfd *abfd, int sec_index, uquad offset,
bfd_boolean justoffset);
static void start_first_etbt_record (bfd *abfd);
static void start_another_etbt_record (bfd *abfd);
static void sto_imm (bfd *abfd, bfd_size_type, unsigned char *, bfd_vma vaddr,
- int index, const char *name);
+ int sec_index, const char *name);
static void end_etir_record (bfd *abfd);
static void etir_output_check (bfd *abfd, asection *section, bfd_vma vaddr,
int checklen);