Clang scan-build complains about a variable assigned but never
used.
Although the value stored to 'val' is used in the
enclosing expression, the value is never actually read
from 'val'
Remove the dead assignment. While there, reduce the scope of the
variable by declaring the variable at the point of first use.
Change-Id: Ibe2b55a7d70597833cfa7f3d843e7c3d2407f2df Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6587 Tested-by: jenkins