diff options
author | Alan Modra <amodra@gmail.com> | 2022-02-09 16:21:02 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-02-09 21:26:38 +1030 |
commit | c9fecd62838e481d9902a7fba42a6928370c9b10 (patch) | |
tree | c7cb03f19753380072e454135c8fa729134a6ebb /binutils/readelf.c | |
parent | 5049d00eb7e77e816df6178250e9fee03e503127 (diff) | |
download | gdb-c9fecd62838e481d9902a7fba42a6928370c9b10.zip gdb-c9fecd62838e481d9902a7fba42a6928370c9b10.tar.gz gdb-c9fecd62838e481d9902a7fba42a6928370c9b10.tar.bz2 |
Work around gcc-4 warnings in elf64-ppc.c
elf64-ppc.c: In function 'ppc64_elf_size_dynamic_sections':
elf64-ppc.c:10309:45: error: value computed is not used [-Werror=unused-value]
++lgot_ents, ++lgot_masks, isym != NULL && isym++)
It is of course a silly warning, fixed in later versions of gcc. I
wrote "isym != NULL && isym++" rather than the simpler "isym++" to
stop sanitisers complaining about incrementing a NULL pointer. isym
is of course unused in any code path where it might start off as
NULL. Sometimes you can't win. So don't try to be clever in reading
local symbols only when needed. 99 times out of 100 they will be
cached anyway.
* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Avoid annoying
warnings by always reading local syms.
(ppc64_elf_layout_multitoc): Likewise.
Diffstat (limited to 'binutils/readelf.c')
0 files changed, 0 insertions, 0 deletions