From: Gerhard Sittig Date: Mon, 22 Feb 2021 19:17:02 +0000 (+0100) Subject: fx2lafw: silence integer overflow compile warnings X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=61f1c8fc33ce959f167f6bcb5ba3b0959d60b038;p=sigrok-firmware-fx2lafw.git fx2lafw: silence integer overflow compile warnings Explicitly mark literals for control bitfield values as unsigned, to avoid compiler warnings when the MSB gets set in assignments to a byte. This kind of follows up to commit f6ef2ff72979 after commit b283ba837a11 re-introduced the warning. --- diff --git a/gpif-acquisition.c b/gpif-acquisition.c index 96476ccc..c6ba52a0 100644 --- a/gpif-acquisition.c +++ b/gpif-acquisition.c @@ -161,7 +161,7 @@ static void gpif_make_data_dp_state(volatile BYTE *pSTATE) * BRANCH * Branch to IDLE if condition is true, back to S0 otherwise. */ - pSTATE[0] = (1 << 7) | (7 << 3) | (0 << 0); + pSTATE[0] = (1u << 7) | (7u << 3) | (0u << 0); /* * OPCODE