arm_semihosting: fix two dead assignments
commit48d74f97114a76563753918da8708d45098fbf1d
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 22 Sep 2021 16:59:38 +0000 (22 18:59 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Mon, 25 Oct 2021 16:09:12 +0000 (25 16:09 +0000)
treefe09cec6650a65185a3b435f0c681480ccc3d360
parent57262ebeae7be08ba260c36bb11630e03e594856
arm_semihosting: fix two dead assignments

Clang scan-build complains for two dead assignments:
Value stored to 'r' is never read

Use the variable in the following line, instead of re-computing
the pointer.

Change-Id: I5d4069872be9da85fb28bbe0a82020b90f1efe46
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6589
Tested-by: jenkins
src/target/arm_semihosting.c