]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix -Wshadow warning in asm-tst9.
authorRoland McGrath <roland@redhat.com>
Mon, 15 Feb 2010 23:15:50 +0000 (15:15 -0800)
committerRoland McGrath <roland@redhat.com>
Mon, 15 Feb 2010 23:15:50 +0000 (15:15 -0800)
tests/ChangeLog
tests/asm-tst9.c

index 87654d605bdccc4cdad15e608a15f3c06f4d0552..29789e2b13dabc6a225c05272c965ee895484b54 100644 (file)
@@ -1,3 +1,7 @@
+2010-02-15  Roland McGrath  <roland@redhat.com>
+
+       * asm-tst9.c (main): Rename local to avoid shadowing another local.
+
 2009-07-22  Roland McGrath  <roland@redhat.com>
 
        * addrcfi.c: Update dwarf_frame_{cfa,register} calling convention.
index 1797e48c12a424fc2aa68181ae7c95d8a09cc014..ad252759c1fa8ff6754f7af86f46b25891543f1b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2005 Red Hat, Inc.
+/* Copyright (C) 2002-2010 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -211,19 +211,19 @@ main (void)
 
   for (cnt = 1; cnt < 3; ++cnt)
     {
-      Elf_Scn *scn;
+      Elf_Scn *escn;
       GElf_Shdr shdr_mem;
       GElf_Shdr *shdr;
 
-      scn = elf_getscn (elf, cnt);
-      if (scn == NULL)
+      escn = elf_getscn (elf, cnt);
+      if (escn == NULL)
        {
          printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1));
          result = 1;
          continue;
        }
 
-      shdr = gelf_getshdr (scn, &shdr_mem);
+      shdr = gelf_getshdr (escn, &shdr_mem);
       if (shdr == NULL)
        {
          printf ("cannot get section header for section %Zd: %s\n",
@@ -303,7 +303,7 @@ main (void)
 
       if (cnt == 1)
        {
-         Elf_Data *data = elf_getdata (scn, NULL);
+         Elf_Data *data = elf_getdata (escn, NULL);
 
          if (data == NULL)
            {