diff options
Diffstat (limited to 'misc/sigrok-firmware-fx2lafw/patches/00-fx2lafw__silence_integer_overflow_compile_warnings.patch')
-rw-r--r-- | misc/sigrok-firmware-fx2lafw/patches/00-fx2lafw__silence_integer_overflow_compile_warnings.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/misc/sigrok-firmware-fx2lafw/patches/00-fx2lafw__silence_integer_overflow_compile_warnings.patch b/misc/sigrok-firmware-fx2lafw/patches/00-fx2lafw__silence_integer_overflow_compile_warnings.patch new file mode 100644 index 0000000000..57143d0f91 --- /dev/null +++ b/misc/sigrok-firmware-fx2lafw/patches/00-fx2lafw__silence_integer_overflow_compile_warnings.patch @@ -0,0 +1,26 @@ +From: Gerhard Sittig <redacted> +Date: Mon, 22 Feb 2021 19:17:02 +0000 (+0100) +Subject: fx2lafw: silence integer overflow compile warnings +X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=61f1c8fc33ce959f167f6bcb5ba3b0959d60b038 + +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 |