From e7f8eadb7897a84b7e76370aee406ea53a88cec6 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Tue, 15 Dec 2009 02:02:39 +0000 Subject: [PATCH] 2009-12-14 Doug Kwan bfd/ChangeLog: * opncls.c (bfd_opnr_iovec): Rename parameters to avoid shawdowed variable warnings. * bfd-in2.h: Regnenerate. include/ChangeLog: * bfdlink.h (struct bfd_link_callbacks): Rename function parameters to avoid shadowed variable warnings. * dis-asm.h (struct disassemble_info): Ditto. (disassemble_init_for_target): Ditto. (init_disassemble_info): Ditto. --- bfd/ChangeLog | 6 ++++++ bfd/bfd-in2.h | 8 ++++---- bfd/opncls.c | 44 ++++++++++++++++++++++---------------------- include/ChangeLog | 8 ++++++++ include/bfdlink.h | 4 ++-- include/dis-asm.h | 14 +++++++------- 6 files changed, 49 insertions(+), 35 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5b339a9..443844d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-12-14 Doug Kwan + + * opncls.c (bfd_opnr_iovec): Rename parameters to avoid shawdowed + variable warnings. + * bfd-in2.h: Regnenerate. + 2009-12-12 Nick Clifton * coff-arm.c (coff_arm_rtype_to_howto): Fix shadowed variable diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index aa58ca6..c78e17d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -971,17 +971,17 @@ bfd *bfd_fdopenr (const char *filename, const char *target, int fd); bfd *bfd_openstreamr (const char *, const char *, void *); bfd *bfd_openr_iovec (const char *filename, const char *target, - void *(*open) (struct bfd *nbfd, + void *(*open_func) (struct bfd *nbfd, void *open_closure), void *open_closure, - file_ptr (*pread) (struct bfd *nbfd, + file_ptr (*pread_func) (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset), - int (*close) (struct bfd *nbfd, + int (*close_func) (struct bfd *nbfd, void *stream), - int (*stat) (struct bfd *abfd, + int (*stat_func) (struct bfd *abfd, void *stream, struct stat *sb)); diff --git a/bfd/opncls.c b/bfd/opncls.c index 7a884c2..520cab6 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -376,47 +376,47 @@ FUNCTION SYNOPSIS bfd *bfd_openr_iovec (const char *filename, const char *target, - void *(*open) (struct bfd *nbfd, - void *open_closure), + void *(*open_func) (struct bfd *nbfd, + void *open_closure), void *open_closure, - file_ptr (*pread) (struct bfd *nbfd, - void *stream, - void *buf, - file_ptr nbytes, - file_ptr offset), - int (*close) (struct bfd *nbfd, - void *stream), - int (*stat) (struct bfd *abfd, - void *stream, - struct stat *sb)); + file_ptr (*pread_func) (struct bfd *nbfd, + void *stream, + void *buf, + file_ptr nbytes, + file_ptr offset), + int (*close_func) (struct bfd *nbfd, + void *stream), + int (*stat_func) (struct bfd *abfd, + void *stream, + struct stat *sb)); DESCRIPTION Create and return a BFD backed by a read-only @var{stream}. - The @var{stream} is created using @var{open}, accessed using - @var{pread} and destroyed using @var{close}. + The @var{stream} is created using @var{open_func}, accessed using + @var{pread_func} and destroyed using @var{close_func}. Calls <>, so @var{target} is interpreted as by that function. - Calls @var{open} (which can call <> and + Calls @var{open_func} (which can call <> and <>) to obtain the read-only stream backing - the BFD. @var{open} either succeeds returning the + the BFD. @var{open_func} either succeeds returning the non-<> @var{stream}, or fails returning <> (setting <>). - Calls @var{pread} to request @var{nbytes} of data from + Calls @var{pread_func} to request @var{nbytes} of data from @var{stream} starting at @var{offset} (e.g., via a call to - <>). @var{pread} either succeeds returning the + <>). @var{pread_func} either succeeds returning the number of bytes read (which can be less than @var{nbytes} when end-of-file), or fails returning -1 (setting <>). - Calls @var{close} when the BFD is later closed using - <>. @var{close} either succeeds returning 0, or + Calls @var{close_func} when the BFD is later closed using + <>. @var{close_func} either succeeds returning 0, or fails returning -1 (setting <>). - Calls @var{stat} to fill in a stat structure for bfd_stat, - bfd_get_size, and bfd_get_mtime calls. @var{stat} returns 0 + Calls @var{stat_func} to fill in a stat structure for bfd_stat, + bfd_get_size, and bfd_get_mtime calls. @var{stat_func} returns 0 on success, or returns -1 on failure (setting <>). If <> returns <> then an error has diff --git a/include/ChangeLog b/include/ChangeLog index a98fb2b..bc71027 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,11 @@ +2009-12-14 Doug Kwan + + * bfdlink.h (struct bfd_link_callbacks): Rename function parameters + to avoid shadowed variable warnings. + * dis-asm.h (struct disassemble_info): Ditto. + (disassemble_init_for_target): Ditto. + (init_disassemble_info): Ditto. + 2009-12-03 David Daney Adam Nemet diff --git a/include/bfdlink.h b/include/bfdlink.h index 4f63af9..af3c5c4 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -540,11 +540,11 @@ struct bfd_link_callbacks /* A function which is called when a relocation is attempted against an undefined symbol. NAME is the symbol which is undefined. ABFD, SECTION and ADDRESS identify the location from which the - reference is made. FATAL indicates whether an undefined symbol is + reference is made. IS_FATAL indicates whether an undefined symbol is a fatal error or not. In some cases SECTION may be NULL. */ bfd_boolean (*undefined_symbol) (struct bfd_link_info *, const char *name, bfd *abfd, - asection *section, bfd_vma address, bfd_boolean fatal); + asection *section, bfd_vma address, bfd_boolean is_fatal); /* A function which is called when a reloc overflow occurs. ENTRY is the link hash table entry for the symbol the reloc is against. NAME is the name of the local symbol or section the reloc is diff --git a/include/dis-asm.h b/include/dis-asm.h index 3d126be..103f670 100644 --- a/include/dis-asm.h +++ b/include/dis-asm.h @@ -127,18 +127,18 @@ typedef struct disassemble_info Returns an errno value or 0 for success. */ int (*read_memory_func) (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, - struct disassemble_info *info); + struct disassemble_info *dinfo); /* Function which should be called if we get an error that we can't recover from. STATUS is the errno value from read_memory_func and MEMADDR is the address that we were trying to read. INFO is a pointer to this struct. */ void (*memory_error_func) - (int status, bfd_vma memaddr, struct disassemble_info *info); + (int status, bfd_vma memaddr, struct disassemble_info *dinfo); /* Function called to print ADDR. */ void (*print_address_func) - (bfd_vma addr, struct disassemble_info *info); + (bfd_vma addr, struct disassemble_info *dinfo); /* Function called to determine if there is a symbol at the given ADDR. If there is, the function returns 1, otherwise it returns 0. @@ -148,13 +148,13 @@ typedef struct disassemble_info address, (normally because there is a symbol associated with that address), but sometimes we want to mask out the overlay bits. */ int (* symbol_at_address_func) - (bfd_vma addr, struct disassemble_info * info); + (bfd_vma addr, struct disassemble_info *dinfo); /* Function called to check if a SYMBOL is can be displayed to the user. This is used by some ports that want to hide special symbols when displaying debugging outout. */ bfd_boolean (* symbol_is_valid) - (asymbol *, struct disassemble_info * info); + (asymbol *, struct disassemble_info *dinfo); /* These are for buffer_read_memory. */ bfd_byte *buffer; @@ -317,7 +317,7 @@ extern disassembler_ftype disassembler (bfd *); /* Amend the disassemble_info structure as necessary for the target architecture. Should only be called after initialising the info->arch field. */ -extern void disassemble_init_for_target (struct disassemble_info * info); +extern void disassemble_init_for_target (struct disassemble_info * dinfo); /* Document any target specific options available from the disassembler. */ extern void disassembler_usage (FILE *); @@ -352,7 +352,7 @@ extern bfd_boolean generic_symbol_is_valid /* Method to initialize a disassemble_info struct. This should be called by all applications creating such a struct. */ -extern void init_disassemble_info (struct disassemble_info *info, void *stream, +extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, fprintf_ftype fprintf_func); /* For compatibility with existing code. */ -- 2.7.4