]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[ARM, sim] Fix build failure with -Werror (PR26365)
authorLuis Machado <luis.machado@linaro.org>
Thu, 13 Aug 2020 13:32:52 +0000 (10:32 -0300)
committerLuis Machado <luis.machado@linaro.org>
Thu, 13 Aug 2020 13:32:52 +0000 (10:32 -0300)
commita5353ae6cf1716c0ff6f7037dc3c336f0d99ecc1
tree855e49a518963e4865728d74a02d433945909918
parentece5bc8ac303ccf03dd066ce7e1cba3a12293e40
[ARM, sim] Fix build failure with -Werror (PR26365)

There is a bit of a situation in the ARM sim with regards to the handling
of argv. sim_open () gets a const char **argv, but ARM's sim_open gets
clever and decides to modify argv in place via sim_target_parse_command_line.
I'm not sure why.

In any case, here's a fix that makes the code modify a copy of argv instead.

sim/arm/ChangeLog:

2020-08-13  Luis Machado  <luis.machado@linaro.org>

PR sim/26365

* wrapper.c (sim_target_parse_command_line): Free discarded argv
entries.
(sim_open): Use a duplicate of argv instead of the original argv.
sim/arm/ChangeLog
sim/arm/wrapper.c