Skip to content

Commit 5e46ac4

Browse files
committed
silence warning: thermopro_tp862b.c:78 - b[7] == ~b[8] causes sign-compare warning due to integer promotion of ~ on unsigned
1 parent a0247a6 commit 5e46ac4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/devices/thermopro_tp862b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static int thermopro_tp862b_decode(r_device *decoder, bitbuffer_t *bitbuffer)
7575
bitbuffer_extract_bytes(bitbuffer, 0, offset, b, 9 * 8);
7676

7777
// Validate Checksum format. Byte 7 must be equal to byte 8 inverted.
78-
if (b[7] == ~b[8]) {
78+
if (b[7] == (uint8_t)~b[8]) {
7979
decoder_logf(decoder, 2, __func__, "Checksum byte 7 is supposed to be equal to byte 8 inverted. Actual: %02x vs %02x (inverted %02x)", b[7], b[8], ~b[8]);
8080
return DECODE_FAIL_MIC;
8181
}

0 commit comments

Comments
 (0)