Rename function arguments to avoid shadowing global symbols of the same name.
authorNick Clifton <nickc@redhat.com>
Wed, 31 Jul 2002 09:38:04 +0000 (09:38 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 31 Jul 2002 09:38:04 +0000 (09:38 +0000)
bfd/ChangeLog
bfd/bfd-in2.h
bfd/bfd.c
bfd/libbfd.h
bfd/libcoff.h
binutils/ChangeLog
binutils/addr2line.c

index 5da8eb5223a728d1839f392d30ca98d29a75a2a4..064883afb084ebc89c4c4195fce92dc108456919 100644 (file)
@@ -1,3 +1,12 @@
+2002-07-31  Nick Clifton  <nickc@redhat.com>
+
+       * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
+       'alternative' in order to avoid shadowing global symbol of the
+       same name.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+       * libcoff.h: Regenerate.
+
 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * Makefile.am: Add n32 ABI support.
index 401b02772747adace860fd8861ace28e8c22c37b..da3307d678f7dc251537893eb0d7e0f5fb4dfd93 100644 (file)
@@ -1,7 +1,6 @@
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", 
-   "section.c", "archures.c", "reloc.c", "syms.c", "bfd.c", "archive.c", 
-   "corefile.c", "targets.c" and "format.c".
+   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c" and 
+   "section.c".
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* Main header file for the bfd library -- portable access to object files.
@@ -3663,7 +3662,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
                  boolean, asymbol **));
 
 boolean
-bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
 
 /* Extracted from archive.c.  */
 symindex
index d230aac5af66366cefbc3d1589b04941c4d0d001..277c74a7422762c8c7a7f44b18522a7ba472d513 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1334,27 +1334,27 @@ FUNCTION
        bfd_alt_mach_code
 
 SYNOPSIS
-       boolean bfd_alt_mach_code(bfd *abfd, int index);
+       boolean bfd_alt_mach_code(bfd *abfd, int alternative);
 
 DESCRIPTION
 
        When more than one machine code number is available for the
        same machine type, this function can be used to switch between
-       the preferred one (index == 0) and any others.  Currently,
+       the preferred one (alternative == 0) and any others.  Currently,
        only ELF supports this feature, with up to two alternate
        machine codes.
 */
 
 boolean
-bfd_alt_mach_code (abfd, index)
+bfd_alt_mach_code (abfd, alternative)
      bfd *abfd;
-     int index;
+     int alternative;
 {
   if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
     {
       int code;
 
-      switch (index)
+      switch (alternative)
        {
        case 0:
          code = get_elf_backend_data (abfd)->elf_machine_code;
index f7c8cc1556990dc1688a7508ceccc7aa22f958e0..ae1e753594b0bfc3be5e248d0f62c6879f12f52f 100644 (file)
@@ -1,6 +1,5 @@
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "libbfd-in.h", "init.c", "libbfd.c", "cache.c", 
-   "reloc.c", "archures.c" and "elf.c".
+   generated from "proto.str                   chew".
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* libbfd.h -- Declarations used by bfd library *implementation*.
index 88b0909829610e5f4db50973d8ec3736d8939c2b..e2f6786cedb4eaf225189089a5deed0fc60a94e0 100644 (file)
@@ -1,5 +1,5 @@
 /* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "libcoff-in.h" and "coffcode.h".
+   generated from "proto.str                   chew".
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* BFD COFF object file private structure.
index 73628035fb90ecc885d7198e8771682e819ff5cd..239f3273441e27740b70d586a45019e172637079 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-31  Nick Clifton  <nickc@redhat.com>
+
+       * addr2line.c (process_file): Rename parameter 'filename' to
+       'file_name' in order to avoid shadowing global symbol of the
+       same name.
+       (main): Likewise.
+
 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
 
        * readelf.c (OPTION_DEBUG_DUMP): Define.
index 2d9dc90015c8712a0a1d994664568abc5735f5f3..174a0348908046e76f59b2821df981208304f7b3 100644 (file)
@@ -233,19 +233,19 @@ translate_addresses (abfd)
 /* Process a file.  */
 
 static void
-process_file (filename, target)
-     const char *filename;
+process_file (file_name, target)
+     const char *file_name;
      const char *target;
 {
   bfd *abfd;
   char **matching;
 
-  abfd = bfd_openr (filename, target);
+  abfd = bfd_openr (file_name, target);
   if (abfd == NULL)
-    bfd_fatal (filename);
+    bfd_fatal (file_name);
 
   if (bfd_check_format (abfd, bfd_archive))
-    fatal (_("%s: can not get addresses from archive"), filename);
+    fatal (_("%s: can not get addresses from archive"), file_name);
 
   if (! bfd_check_format_matches (abfd, bfd_object, &matching))
     {
@@ -278,7 +278,7 @@ main (argc, argv)
      int argc;
      char **argv;
 {
-  const char *filename;
+  const char *file_name;
   char *target;
   int c;
 
@@ -297,7 +297,7 @@ main (argc, argv)
   bfd_init ();
   set_default_bfd_target ();
 
-  filename = NULL;
+  file_name = NULL;
   target = NULL;
   while ((c = getopt_long (argc, argv, "b:Ce:sfHhVv", long_options, (int *) 0))
         != EOF)
@@ -324,7 +324,7 @@ main (argc, argv)
            }
          break;
        case 'e':
-         filename = optarg;
+         file_name = optarg;
          break;
        case 's':
          base_names = true;
@@ -346,13 +346,13 @@ main (argc, argv)
        }
     }
 
-  if (filename == NULL)
-    filename = "a.out";
+  if (file_name == NULL)
+    file_name = "a.out";
 
   addr = argv + optind;
   naddr = argc - optind;
 
-  process_file (filename, target);
+  process_file (file_name, target);
 
   return 0;
 }
This page took 0.036655 seconds and 4 git commands to generate.