From 13c505ccc7d75954d061b28f4a65cab2eacabf22 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Fri, 3 Apr 2026 07:48:50 +0200 Subject: [PATCH] colognechip: fix -Wshift-op-parentheses warning --- src/colognechip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/colognechip.cpp b/src/colognechip.cpp index 7f3e42a..b1fb8d4 100644 --- a/src/colognechip.cpp +++ b/src/colognechip.cpp @@ -436,7 +436,7 @@ int CologneChip::spi_put(uint8_t cmd, const uint8_t *tx, uint8_t *rx, uint32_t l for (uint32_t i=0; i < len; i++) { uint8_t b0 = ConfigBitstreamParser::reverseByte(jrx[i+1]); uint8_t b1 = ConfigBitstreamParser::reverseByte(jrx[i+2]); - rx[i] = (b0 << shift) | (b1 >> 8-shift); + rx[i] = (b0 << shift) | (b1 >> (8-shift)); } } return 0; @@ -490,7 +490,7 @@ int CologneChip::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond, _jtag->read_write(dummy, rx, 16, 0); uint8_t b0 = ConfigBitstreamParser::reverseByte(rx[0]); uint8_t b1 = ConfigBitstreamParser::reverseByte(rx[1]); - tmp = (b0 << shift) | (b1 >> 8-shift); + tmp = (b0 << shift) | (b1 >> (8-shift)); count++; if (count == timeout) {