From 55b581a678345dabcf1ca31cedbfb5834b0b4433 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 1 Aug 2007 08:57:23 +0000 Subject: [PATCH] * elf.c (_bfd_elf_map_sections_to_segments): Work around buggy GCC 3.4.x warning. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f0e13f279d5..36f0583e673 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-08-01 Jakub Jelinek + + * elf.c (_bfd_elf_map_sections_to_segments): Work around buggy + GCC 3.4.x warning. + 2007-08-01 Alan Modra * aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown diff --git a/bfd/elf.c b/bfd/elf.c index 94e32db4c83..0334cb88817 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3732,13 +3732,16 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) amt = sizeof (struct elf_segment_map); if (s->alignment_power == 2) for (s2 = s; s2->next != NULL; s2 = s2->next) - if (s2->next->alignment_power == 2 - && (s2->next->flags & SEC_LOAD) != 0 - && CONST_STRNEQ (s2->next->name, ".note") - && align_power (s2->vma + s2->size, 2) == s2->next->vma) - count++; - else - break; + { + if (s2->next->alignment_power == 2 + && (s2->next->flags & SEC_LOAD) != 0 + && CONST_STRNEQ (s2->next->name, ".note") + && align_power (s2->vma + s2->size, 2) + == s2->next->vma) + count++; + else + break; + } amt += (count - 1) * sizeof (asection *); m = bfd_zalloc (abfd, amt); if (m == NULL) -- 2.30.2