fix warning in Debug mode

This commit is contained in:
Gwenhael Goavec-Merou 2021-07-14 17:59:02 +02:00
parent be6ed217dd
commit cd64bce4f2
4 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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 */

View File

@ -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) {

View File

@ -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)