[patch] elf64-s390.c: Fix -Werror=misleading-indentation

Jan Kratochvil jan.kratochvil@redhat.com
Sun Jan 31 19:21:00 GMT 2016


Hi,

gcc-6.0.0-0.7.fc24.x86_64
+
https://kojipkgs.fedoraproject.org//work/tasks/8536/12758536/build.log
../../bfd/elf64-s390.c: In function 'elf_s390_reloc_name_lookup':
../../bfd/elf64-s390.c:340:5: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
     if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
     ^~
../../bfd/elf64-s390.c:333:3: note: ...this 'for' clause, but it is not
   for (i = 0;
   ^~~

For some reason I cannot reproduce the error locally but the error seems
obvious there to me.  OK for check-in?


Thanks,
Jan


bfd/ChangeLog
2016-01-31  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.

diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 3887e8d..1261044 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -337,10 +337,10 @@ elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 	&& strcasecmp (elf_howto_table[i].name, r_name) == 0)
       return &elf_howto_table[i];
 
-    if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
-      return &elf64_s390_vtinherit_howto;
-    if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
-      return &elf64_s390_vtentry_howto;
+  if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
+    return &elf64_s390_vtinherit_howto;
+  if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
+    return &elf64_s390_vtentry_howto;
 
   return NULL;
 }



More information about the Binutils mailing list