diff --git a/src/configBitstreamParser.cpp b/src/configBitstreamParser.cpp index a96bf59..67acba8 100644 --- a/src/configBitstreamParser.cpp +++ b/src/configBitstreamParser.cpp @@ -21,6 +21,7 @@ ConfigBitstreamParser::ConfigBitstreamParser(const string &filename, int mode, _file_size(0), _verbose(verbose), _bit_data(), _raw_data(), _hdr() { + (void) mode; if (!filename.empty()) { FILE *_fd = fopen(filename.c_str(), "rb"); if (!_fd) diff --git a/src/fsparser.cpp b/src/fsparser.cpp index c333e5f..b9e294a 100644 --- a/src/fsparser.cpp +++ b/src/fsparser.cpp @@ -185,7 +185,7 @@ int FsParser::parse() /* For configuration data checksum: number of lines can't be higher than * the number indicates in TN653 but may be smaller (seen with the GW1NS-2C). */ - if (stoi(_hdr["ConfDataLength"]) < nb_line) + if (stoul(_hdr["ConfDataLength"]) < nb_line) nb_line = stoi(_hdr["ConfDataLength"]); /* drop now useless header */ diff --git a/src/fx2_ll.cpp b/src/fx2_ll.cpp index 8641ba5..9f3164f 100644 --- a/src/fx2_ll.cpp +++ b/src/fx2_ll.cpp @@ -32,7 +32,7 @@ FX2_ll::FX2_ll(uint16_t uninit_vid, uint16_t uninit_pid, } /* try to open uninitialized device */ - if (uninit_vid != -1 && uninit_pid != -1) { + if (uninit_vid != 0 && uninit_pid != 0) { dev_handle = libusb_open_device_with_vid_pid(usb_ctx, uninit_vid, uninit_pid); if (dev_handle) { diff --git a/src/usbBlaster.cpp b/src/usbBlaster.cpp index 1e9f4a8..c80a794 100644 --- a/src/usbBlaster.cpp +++ b/src/usbBlaster.cpp @@ -42,6 +42,7 @@ UsbBlaster::UsbBlaster(int vid, int pid, const std::string &firmware_path, _verbose(verbose), _nb_bit(0), _curr_tms(0), _buffer_size(64) { + (void) vid; if (pid == 0x6001) ll_driver = new UsbBlasterI(); else if (pid == 0x6810)