base: set parent info in child_process solely once

clang:
 warning: Value stored to 'parent_info' is never read

Issue #3022
This commit is contained in:
Alexander Boettcher 2018-10-25 16:37:51 +02:00 committed by Christian Helmuth
parent 5120e5138c
commit 886619f63e

View File

@ -55,6 +55,8 @@ Child::Process::Loaded_executable::Loaded_executable(Type type,
/* setup region map for the new pd */
Elf_segment seg;
bool parent_info = false;
for (unsigned n = 0; (seg = elf.get_segment(n)).valid(); ++n) {
if (seg.flags().skip) continue;
if (seg.mem_size() == 0) continue;
@ -63,8 +65,6 @@ Child::Process::Loaded_executable::Loaded_executable(Type type,
addr_t const addr = (addr_t)seg.start();
size_t const size = seg.mem_size();
bool parent_info = false;
bool const write = seg.flags().w;
bool const exec = seg.flags().x;