static_cast to avoid warning (thanks to sszy)

This commit is contained in:
Fabien Marteau 2019-11-19 16:14:37 +01:00
parent cccfe68266
commit a58907e4bf
1 changed files with 2 additions and 2 deletions

View File

@ -204,8 +204,8 @@ int FtdiJtag::read_write(unsigned char *tdi, unsigned char *tdo, int len, char l
unsigned char tx_buf[3] = {(unsigned char)(MPSSE_LSB | MPSSE_WRITE_NEG |
((tdi) ? MPSSE_DO_WRITE : 0) |
((tdo) ? (MPSSE_DO_READ | MPSSE_READ_NEG) : 0)),
((xfer - 1) & 0xff), // low
(((xfer - 1) >> 8) & 0xff)}; // high
static_cast<unsigned char>((xfer - 1) & 0xff), // low
static_cast<unsigned char>((((xfer - 1) >> 8) & 0xff))}; // high
flushTMS(true);