From 7e763dcc252cd5ca73b946c90a74c9b2766a7894 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 19 Aug 2020 16:57:07 +0200 Subject: [PATCH] xilinx:cppcheck --- src/xilinx.cpp | 4 ++-- src/xilinx.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xilinx.cpp b/src/xilinx.cpp index c5ad81d..640190f 100644 --- a/src/xilinx.cpp +++ b/src/xilinx.cpp @@ -10,7 +10,7 @@ #include "part.hpp" #include "progressBar.hpp" -Xilinx::Xilinx(Jtag *jtag, std::string filename, bool verbose): +Xilinx::Xilinx(Jtag *jtag, const std::string &filename, bool verbose): Device(jtag, filename, verbose) { if (_filename != ""){ @@ -294,7 +294,7 @@ int Xilinx::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond, break; } if (verbose) { - printf("%x %x %x %d\n", tmp, mask, cond, count); + printf("%x %x %x %u\n", tmp, mask, cond, count); } } while ((tmp & mask) != cond); _jtag->go_test_logic_reset(); diff --git a/src/xilinx.hpp b/src/xilinx.hpp index fd6b88c..a7b56fb 100644 --- a/src/xilinx.hpp +++ b/src/xilinx.hpp @@ -10,14 +10,14 @@ class Xilinx: public Device, SPIInterface { public: - Xilinx(Jtag *jtag, std::string filename, bool verbose); + Xilinx(Jtag *jtag, const std::string &filename, bool verbose); ~Xilinx(); void program(unsigned int offset = 0) override; void program_spi(unsigned int offset = 0); void program_mem(BitParser &bitfile); - int idCode(); - void reset(); + int idCode() override; + void reset() override; /* spi interface */ int spi_put(uint8_t cmd, uint8_t *tx, uint8_t *rx,