blob: 6ecd763660b02020deb413a14418a662c00db9a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
From 7e7d7da3e8d453d1125488cc5cd7c42293b62934 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Fri, 5 Jun 2020 01:17:51 -0700
Subject: [PATCH] Adjust style to prevent gcc warning
This is still implementation-defined, but matches the style used
elsewhere in this file and prevents a conversion overflow warning.
---
bfd/elf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bfd/elf.c b/bfd/elf.c
index 84a5d94281..5631993d15 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -734,8 +734,9 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
/* If all groups are invalid then fail. */
if (num_group == 0)
{
+ num_group = (unsigned) -1;
elf_tdata (abfd)->group_sect_ptr = NULL;
- elf_tdata (abfd)->num_group = num_group = -1;
+ elf_tdata (abfd)->num_group = num_group;
_bfd_error_handler
(_("%pB: no valid group sections found"), abfd);
bfd_set_error (bfd_error_bad_value);
--
2.30.0
|