2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-08-05 17:40:16 +10:00
openocd/src/target
Antonio Borneo aff48a6a31 target/riscv: fix dead assignment
Scan-build reports:
	Unused code: Dead nested assignment
	riscv.c:459 Although the value stored to 'ir_user4_raw' is
		used in the enclosing expression, the value is
		never actually read from 'ir_user4_raw'

This is caused by the value reassigned in 'ir_user4_raw':
	riscv.c:459 ir_user4[3] = (uint8_t)(ir_user4_raw >>= 8);
but never used.

Drop the DIY conversion in favor of h_u32_to_le() that does not
reassign the input value.

Change-Id: Ifad29f4c46d4a2d0a2f5a5c4104d768cc3db2794
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7208
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Jan Matyas <matyas@codasip.com>
Tested-by: jenkins
2022-09-23 21:24:41 +00:00
..
espressif openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
openrisc openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
riscv target/riscv: fix dead assignment 2022-09-23 21:24:41 +00:00
xtensa openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
a64_disassembler.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
a64_disassembler.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
aarch64.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
aarch64.h target: move parent target structs just after common_magic 2022-08-14 12:10:14 +00:00
adi_v5_dapdirect.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
adi_v5_jtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
adi_v5_swd.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
algorithm.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
algorithm.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arc_cmd.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arc_cmd.h openocd: src: fix incorrect SPDX tags 2022-07-23 13:16:09 +00:00
arc_jtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arc_jtag.h openocd: src: fix incorrect SPDX tags 2022-07-23 13:16:09 +00:00
arc_mem.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arc_mem.h openocd: src: fix incorrect SPDX tags 2022-07-23 13:16:09 +00:00
arc.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arc.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm7_9_common.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm7_9_common.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm7tdmi.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm7tdmi.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm9tdmi.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm9tdmi.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm11_dbgtap.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm11_dbgtap.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm11.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm11.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm720t.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm720t.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm920t.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm920t.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm926ejs.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm926ejs.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm946e.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm946e.h target: don't export local symbols 2022-09-13 22:13:58 +00:00
arm966e.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm966e.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
arm_adi_v5.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_adi_v5.h arm_adi_v5: Adding Nuvoton NPCX quirk 2022-07-30 08:49:47 +00:00
arm_coresight.h arm_adi_v5: replace dap_lookup_cs_component() 2022-05-14 08:55:52 +00:00
arm_cti.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_cti.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_dap.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_disassembler.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_disassembler.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_dpm.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_dpm.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_jtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_jtag.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_opcodes.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_semihosting.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_semihosting.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_simulator.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_simulator.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
arm_tpiu_swo.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
arm_tpiu_swo.h
arm.h target: don't export local symbols 2022-09-13 22:13:58 +00:00
armv4_5_cache.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv4_5_cache.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv4_5_mmu.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv4_5_mmu.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv4_5.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv4_5.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv7a_cache_l2x.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7a_cache_l2x.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv7a_cache.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7a_cache.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv7a_mmu.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7a_mmu.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv7a.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7a.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
armv7m_trace.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7m_trace.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv7m.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv7m.h openocd: remove CamelCase symbols *xPSR* 2022-09-13 22:03:02 +00:00
armv8_cache.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv8_cache.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
armv8_dpm.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv8_dpm.h openocd: src: replace the incomplete GPL-2.0-or-later license tag 2022-07-23 13:15:24 +00:00
armv8_opcodes.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv8_opcodes.h openocd: remove CamelCase symbols *xPSR* 2022-09-13 22:03:02 +00:00
armv8.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
armv8.h openocd: remove CamelCase symbols *xPSR* 2022-09-13 22:03:02 +00:00
avr32_ap7k.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
avr32_ap7k.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
avr32_jtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
avr32_jtag.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
avr32_mem.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
avr32_mem.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
avr32_regs.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
avr32_regs.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
avrt.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
avrt.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
breakpoints.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
breakpoints.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
cortex_a.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
cortex_a.h target: move parent target structs just after common_magic 2022-08-14 12:10:14 +00:00
cortex_m.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
cortex_m.h target/arm: Add support with identify STAR-MC1 2022-09-03 21:26:20 +00:00
dsp563xx_once.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
dsp563xx_once.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
dsp563xx.c target/dsp563xx: fix scan-build warning 2022-09-23 21:22:09 +00:00
dsp563xx.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
dsp5680xx.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
dsp5680xx.h target: don't export local symbols 2022-09-13 22:13:58 +00:00
embeddedice.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
embeddedice.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
esirisc_jtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
esirisc_jtag.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
esirisc_regs.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
esirisc_trace.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
esirisc_trace.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
esirisc.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
esirisc.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
etb.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
etb.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
etm_dummy.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
etm_dummy.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
etm.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
etm.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
fa526.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
feroceon.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
hla_target.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
image.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
image.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
lakemont.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
lakemont.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
ls1_sap.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
mem_ap.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips32_dmaacc.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips32_dmaacc.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
mips32_pracc.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips32_pracc.h target: don't export local symbols 2022-09-13 22:13:58 +00:00
mips32.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips32.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
mips64_pracc.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips64_pracc.h
mips64.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips64.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
mips_ejtag.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips_ejtag.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
mips_m4k.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips_m4k.h target: don't export local symbols 2022-09-13 22:13:58 +00:00
mips_mips64.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
mips_mips64.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
nds32_aice.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_aice.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_cmd.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_cmd.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_disassembler.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_disassembler.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_edm.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_insn.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_reg.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_reg.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_tlb.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_tlb.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_v2.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_v2.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_v3_common.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_v3_common.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_v3.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_v3.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32_v3m.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32_v3m.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
nds32.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
nds32.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
quark_d20xx.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
quark_x10xx.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
register.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
register.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
rtt.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
rtt.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
semihosting_common.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
semihosting_common.h openocd: remove recently added CamelCase symbols 2022-09-13 22:02:33 +00:00
smp.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
smp.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
startup.tcl openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
stm8.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
stm8.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
target_request.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
target_request.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
target_type.h gdb_server: custom target-specific GDB queries 2022-08-15 13:23:05 +00:00
target.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
target.h openocd: remove recently added CamelCase symbols 2022-09-13 22:02:33 +00:00
testee.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
trace.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
trace.h openocd: src/target: replace the GPL-2.0-or-later license tag 2022-07-23 13:58:51 +00:00
x86_32_common.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
x86_32_common.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00
xscale.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
xscale.h target: consolidate existing target/algo common_magic 2022-08-14 12:02:38 +00:00