fix warning in Debug mode
This commit is contained in:
parent
be6ed217dd
commit
cd64bce4f2
|
|
@ -21,6 +21,7 @@ ConfigBitstreamParser::ConfigBitstreamParser(const string &filename, int mode,
|
||||||
_file_size(0), _verbose(verbose),
|
_file_size(0), _verbose(verbose),
|
||||||
_bit_data(), _raw_data(), _hdr()
|
_bit_data(), _raw_data(), _hdr()
|
||||||
{
|
{
|
||||||
|
(void) mode;
|
||||||
if (!filename.empty()) {
|
if (!filename.empty()) {
|
||||||
FILE *_fd = fopen(filename.c_str(), "rb");
|
FILE *_fd = fopen(filename.c_str(), "rb");
|
||||||
if (!_fd)
|
if (!_fd)
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ int FsParser::parse()
|
||||||
/* For configuration data checksum: number of lines can't be higher than
|
/* 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).
|
* 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"]);
|
nb_line = stoi(_hdr["ConfDataLength"]);
|
||||||
|
|
||||||
/* drop now useless header */
|
/* drop now useless header */
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ FX2_ll::FX2_ll(uint16_t uninit_vid, uint16_t uninit_pid,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to open uninitialized device */
|
/* 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,
|
dev_handle = libusb_open_device_with_vid_pid(usb_ctx,
|
||||||
uninit_vid, uninit_pid);
|
uninit_vid, uninit_pid);
|
||||||
if (dev_handle) {
|
if (dev_handle) {
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ UsbBlaster::UsbBlaster(int vid, int pid, const std::string &firmware_path,
|
||||||
_verbose(verbose), _nb_bit(0),
|
_verbose(verbose), _nb_bit(0),
|
||||||
_curr_tms(0), _buffer_size(64)
|
_curr_tms(0), _buffer_size(64)
|
||||||
{
|
{
|
||||||
|
(void) vid;
|
||||||
if (pid == 0x6001)
|
if (pid == 0x6001)
|
||||||
ll_driver = new UsbBlasterI();
|
ll_driver = new UsbBlasterI();
|
||||||
else if (pid == 0x6810)
|
else if (pid == 0x6810)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue