-Waddress warning in ldelf.c
authorAlan Modra <amodra@gmail.com>
Thu, 21 Oct 2021 08:48:34 +0000 (19:18 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 21 Oct 2021 11:40:28 +0000 (22:10 +1030)
commitced10cb78d01652f9e1bb1d1e465327dfe1debaa
tree0e5cf667911f0aef0eda116ad3419df156450383
parent84714f86b37ae36fedca2c0936c7d274a4000900
-Waddress warning in ldelf.c

ldelf.c: In function 'ldelf_after_open':
ldelf.c:1049:43: warning: the comparison will always evaluate as 'true' for the address of 'elf_header' will never be NULL [-Waddress]
 1049 |           && elf_tdata (abfd)->elf_header != NULL
      |                                           ^~
In file included from ldelf.c:37:
../bfd/elf-bfd.h:1957:21: note: 'elf_header' declared here
 1957 |   Elf_Internal_Ehdr elf_header[1];      /* Actual data, but ref like ptr */

* ldelf.c (ldelf_after_open): Remove useless elf_header test.
ld/ldelf.c