2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-07-19 23:36:13 +10:00
openocd/src
Antonio Borneo 3ea1bfce4f jtag: xds110: fix clang error core.StackAddressEscape
Clang ignores that xds110_swd_write_reg() is always called with
bit SWD_CMD_RNW in 'cmd' set to zero.
It then complains that the local variable 'value' gets passed by
address to xds110_swd_queue_cmd() and in case of 'read request'
such stack address get stored for later use:
	src/jtag/drivers/xds110.c:1363:1: warning: Address of
	 stack memory associated with local variable 'value' is
	 still referred to by the global variable 'xds110' upon
	 returning to the caller. This will be a dangling
	 reference [core.StackAddressEscape]

To both xds110_swd_write_reg() and xds110_swd_read_reg(), add an
assert() to inform Clang about the state of bit SWD_CMD_RNW.

Change-Id: I7687c055ec71424b642e152f478723a930966e3a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7380
Tested-by: jenkins
2022-12-03 09:25:27 +00:00
..
flash flash: lpc2900: fix clang error 'dead assignment' 2022-12-03 09:24:59 +00:00
helper jep106: update to revision JEP106BF.01 Oct 2022 2022-11-15 21:34:22 +00:00
jtag jtag: xds110: fix clang error core.StackAddressEscape 2022-12-03 09:25:27 +00:00
pld fix leaky file-handle in virtex2 driver 2022-10-08 07:54:49 +00:00
rtos rtos/ThreadX: added check for NULL-named tasks 2022-11-15 21:35:12 +00:00
rtt openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
server openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
svf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
target target/armv7m: fix feature name of ARMv8M security extension regs 2022-11-15 21:39:19 +00:00
transport openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
xsvf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
hello.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
openocd.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00