diff options
| author | Michael Forney <mforney@mforney.org> | 2020-06-05 01:22:33 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-06-05 03:01:44 -0700 |
| commit | df49625a3df572a481bb4256b940b217436eaec9 (patch) | |
| tree | 9548f3920a152f52ca11202418faecba0fa81997 /pkg/binutils/patch | |
| parent | cc7c9fb79404cfcbd03a33f4f34031f9f77d9ecd (diff) | |
binutils: Prevent overflow warning
Diffstat (limited to 'pkg/binutils/patch')
| -rw-r--r-- | pkg/binutils/patch/0005-Adjust-style-to-prevent-gcc-warning.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pkg/binutils/patch/0005-Adjust-style-to-prevent-gcc-warning.patch b/pkg/binutils/patch/0005-Adjust-style-to-prevent-gcc-warning.patch new file mode 100644 index 00000000..16d0c281 --- /dev/null +++ b/pkg/binutils/patch/0005-Adjust-style-to-prevent-gcc-warning.patch @@ -0,0 +1,29 @@ +From b0c9a9929385469f431739a366e8ac9d61d0ac7b 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 a8d98a60f4..a5872a57a1 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -748,8 +748,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.27.0 + |
