From ed7e9340ba96657dacd6a74489212687f97aa7d8 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Fri, 27 Nov 2020 08:29:09 +0100 Subject: [PATCH] lattice: add a memset to avoid valgrind warn --- src/lattice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lattice.cpp b/src/lattice.cpp index 4612751..31d52d7 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -625,6 +625,8 @@ uint32_t Lattice::readStatusReg() { uint32_t reg; uint8_t rx[4], tx[4]; + /* valgrind warn */ + memset(tx, 0, 4); wr_rd(0x3C, tx, 4, rx, 4); _jtag->set_state(Jtag::RUN_TEST_IDLE); _jtag->toggleClk(1000);