openocd/src/target
Svetoslav Enchev 404495b191 target/riscv/riscv-011: fix compile warning about uninitialized variable
In MSYS2 MinGW 64-bit
git clone git://git.code.sf.net/p/openocd/code openocd
$ gcc --version
gcc.exe (Rev1, Built by MSYS2 project) 8.2.0
./bootstrap
./configure --prefix=
$ cat config.status | grep CFLAGS
CFLAGS='-g -O2'
make bindir = "bin-x64"

depbase=`echo src/target/riscv/riscv-011.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -D__USE_MINGW_ANSI_STDIO -I./src -I./src -I./src/helper -DPKGDATADIR=\"/mingw64/share/openocd\" -DBINDIR=\"bin-x64\" -I./jimtcl -I./jimtcl  -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/target/riscv/riscv-011.lo -MD -MP -MF $depbase.Tpo -c -o src/target/riscv/riscv-011.lo src/target/riscv/riscv-011.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D__USE_MINGW_ANSI_STDIO -I./src -I./src -I./src/helper -DPKGDATADIR=\"/mingw64/share/openocd\" -DBINDIR=\"bin-x64\" -I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/target/riscv/riscv-011.lo -MD -MP -MF src/target/riscv/.deps/riscv-011.Tpo -c src/target/riscv/riscv-011.c -o src/target/riscv/riscv-011.o
src/target/riscv/riscv-011.c: In function 'poll_target':
src/target/riscv/riscv-011.c:1799:6: error: 'reg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      reg_cache_set(target, reg, ((data & 0xffffffff) << 32) | value);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/target/riscv/riscv-011.c:1686:17: note: 'reg' was declared here
    unsigned int reg;
                 ^~~
cc1.exe: all warnings being treated as errors
make[2]: *** [Makefile:3250: src/target/riscv/riscv-011.lo] Error 1

Change-Id: I6996dcb866fbace26817636f4bedba09510a087f
Signed-off-by: Svetoslav Enchev <svetoslav.enchev@gmail.com>
Reviewed-on: http://openocd.zylin.com/4635
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2018-08-14 04:32:46 +01:00
..
openrisc server: free strduped port numbers 2018-03-15 17:08:53 +00:00
riscv target/riscv/riscv-011: fix compile warning about uninitialized variable 2018-08-14 04:32:46 +01:00
aarch64.c target/aarch64: Call aarch64_init_debug_access() earlier in aarch64_deassert_reset() 2018-07-20 15:14:46 +01:00
aarch64.h aarch64: add 'maskisr' command 2018-01-16 09:05:41 +00:00
adi_v5_jtag.c arm_adi_v5: Add ability to ignore the CSYSPWRUPACK bit 2018-04-07 20:30:12 +01:00
adi_v5_swd.c arm_adi_v5: put SWJ-DP back to JTAG mode at exit 2018-07-24 13:06:59 +01:00
algorithm.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
algorithm.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm_adi_v5.c target/arm_adi_v5: allow commands apsel and apcsw during init phase 2018-08-06 11:19:11 +01:00
arm_adi_v5.h arm_adi_v5: put SWJ-DP back to JTAG mode at exit 2018-07-24 13:06:59 +01:00
arm_cti.c armv8: valgrind memleak fixes 2018-04-10 09:13:02 +01:00
arm_cti.h armv8: valgrind memleak fixes 2018-04-10 09:13:02 +01:00
arm_dap.c arm_adi_v5: put SWJ-DP back to JTAG mode at exit 2018-07-24 13:06:59 +01:00
arm_disassembler.c target/arm: Add PLD command to ARM disassembler. 2018-06-22 07:42:27 +01:00
arm_disassembler.h target: arm: disassembler: decode v6T2 ARM ISB instruction 2018-01-13 08:36:29 +00:00
arm_dpm.c arm_dpm: flush both scratch registers (R0 and R1) 2018-04-27 20:00:51 +01:00
arm_dpm.h aarch64: register access rewrite 2017-02-10 14:18:34 +01:00
arm_jtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm_opcodes.h Support for Arm VFP v3 registers read/write 2018-03-10 14:25:10 +00:00
arm_semihosting.c Avoid null target->semihosting references. 2018-07-18 21:10:53 +01:00
arm_semihosting.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
arm_simulator.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm_simulator.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
arm7_9_common.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm7_9_common.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm7tdmi.c semihosting: support fileio operation 2016-12-08 12:32:58 +00:00
arm7tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm9tdmi.c semihosting: support fileio operation 2016-12-08 12:32:58 +00:00
arm9tdmi.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11_dbgtap.c Fix usage of timeval_ms() 2016-07-19 10:45:16 +01:00
arm11_dbgtap.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm11.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm11.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm720t.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm720t.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm920t.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm920t.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm926ejs.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm926ejs.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm946e.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
arm946e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
arm966e.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
arm966e.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5_cache.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv4_5_cache.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv4_5_mmu.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
armv4_5_mmu.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
armv4_5.c Avoid null target->semihosting references. 2018-07-18 21:10:53 +01:00
armv4_5.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a_cache_l2x.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
armv7a_cache_l2x.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
armv7a_cache.c target/armv7a_cache: add gdb keep-alive and fix a missing dpm finish 2018-08-08 10:36:28 +01:00
armv7a_cache.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
armv7a.c armv7a: read ttbcr and ttb0/1 at every entry in debug state 2018-07-22 09:09:06 +01:00
armv7a.h armv7a: read ttbcr and ttb0/1 at every entry in debug state 2018-07-22 09:09:06 +01:00
armv7m_trace.c target/armv7m_trace: Use prefix for enums 2018-07-19 10:49:24 +01:00
armv7m_trace.h target/armv7m_trace: Use prefix for enums 2018-07-19 10:49:24 +01:00
armv7m.c Avoid null target->semihosting references. 2018-07-18 21:10:53 +01:00
armv7m.h target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
armv8_cache.c aarch64: fix debug entry from EL0 2018-03-16 08:58:06 +00:00
armv8_cache.h aarch64: add cache handling functions 2017-02-10 14:01:39 +01:00
armv8_dpm.c aarch64: fix debug entry from EL0 2018-03-16 08:58:06 +00:00
armv8_dpm.h aarch64: fix debug entry from EL0 2018-03-16 08:58:06 +00:00
armv8_opcodes.c target aarch64: rework memory read/write to use 8/16/32 bit operations 2018-01-04 09:09:46 +00:00
armv8_opcodes.h Support AArch64 SIMD/FP registers read/write 2018-03-10 13:23:48 +00:00
armv8.c target: armv8: Avoid semihosting segfault on halt 2018-07-13 09:19:09 +01:00
armv8.h Add ARM v8 AArch64 semihosting support 2018-07-13 09:18:14 +01:00
avr32_ap7k.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
avr32_ap7k.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_jtag.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_jtag.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_mem.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_mem.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avr32_regs.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
avr32_regs.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
avrt.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
avrt.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
breakpoints.c breakpoints: simplify the test to find a breakpoint 2018-06-04 09:17:14 +01:00
breakpoints.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
cortex_a.c target/cortex_a: allow command dacrfixup during init phase 2018-08-06 11:19:20 +01:00
cortex_a.h cortex_a: remove partnum magic from arp_examine and dbginit 2016-12-08 12:25:35 +00:00
cortex_m.c target/cortex_m: restore C_MASKINTS after reset 2018-08-14 04:31:38 +01:00
cortex_m.h target/cortex_m: allow setting the type of a breakpoint 2018-04-12 20:49:18 +01:00
dsp563xx_once.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
dsp563xx_once.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp563xx.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
dsp563xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
dsp5680xx.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
dsp5680xx.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
embeddedice.c Use timeval helpers 2018-01-25 16:43:49 +00:00
embeddedice.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etb.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etb.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm_dummy.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etm_dummy.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
etm.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
etm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
fa526.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
feroceon.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
hla_target.c target: restructure dap support 2018-03-30 09:58:21 +01:00
image.c target/image: make i/j unsigned to avoid ubsan runtime error 2018-07-13 17:15:57 +01:00
image.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
lakemont.c target: lakemon: implement assert_reset and deassert_reset 2018-01-13 09:25:34 +00:00
lakemont.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
ls1_sap.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
Makefile.am Add RISC-V support. 2018-07-24 13:07:26 +01:00
mips_ejtag.c mips32, use scan32 function for reading impcode/idcode. 2017-05-08 18:05:58 +01:00
mips_ejtag.h ejtag: added missing instructions. 2018-01-13 09:46:00 +00:00
mips_m4k.c mips_m4k: add optional reset handler 2018-07-31 15:54:28 +01:00
mips_m4k.h mips32: add micromips isa handling 2017-05-08 18:04:56 +01:00
mips32_dmaacc.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
mips32_dmaacc.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
mips32_pracc.c mips32, add support for micromips in debug mode 2017-05-08 18:03:28 +01:00
mips32_pracc.h mips32: inline functions in headers must be static 2017-07-07 09:54:35 +01:00
mips32.c target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
mips32.h target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
nds32_aice.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_aice.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_cmd.c Fix GCC7 warnings about string truncation 2017-10-23 10:54:24 +01:00
nds32_cmd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_disassembler.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_disassembler.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_edm.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_insn.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_reg.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
nds32_reg.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_tlb.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_tlb.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v2.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v2.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3_common.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3_common.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32_v3m.c target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
nds32_v3m.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
nds32.c Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
nds32.h target: Add 64-bit target address support 2017-02-10 13:50:17 +01:00
oocd_trace.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
oocd_trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
quark_d20xx.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
quark_x10xx.c target: quark_x10xx: miscellaneous cleanups 2018-01-13 09:25:12 +00:00
register.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
register.h tdesc: bitfields may carry a type 2018-03-27 09:15:27 +01:00
semihosting_common.c GDB fileIO stdout support 2018-07-13 09:18:21 +01:00
semihosting_common.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
smp.c helper: Code cleanup for hexify() 2016-12-08 12:34:53 +00:00
smp.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
startup.tcl gdb_server: run control fixes for vCont 2018-02-27 11:19:10 +00:00
stm8.c target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
stm8.h stm8 : new target 2017-12-07 07:53:13 +00:00
target_request.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
target_request.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
target_type.h target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
target.c Add RISC-V support. 2018-07-24 13:07:26 +01:00
target.h Rework/update ARM semihosting 2018-06-04 09:16:08 +01:00
testee.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
trace.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
trace.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
x86_32_common.c x86_32_common: fix some warnings 2018-01-30 07:34:32 +00:00
x86_32_common.h target: lakemon: implement assert_reset and deassert_reset 2018-01-13 09:25:34 +00:00
xscale.c Use timeval helpers 2018-01-25 16:43:49 +00:00
xscale.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00