]> sigrok.org Git - sigrok-firmware-fx2lafw.git/commit - gpif-acquisition.c
fx2lafw: silence integer overflow compile warnings
authorGerhard Sittig <redacted>
Fri, 29 Dec 2017 15:06:23 +0000 (16:06 +0100)
committerUwe Hermann <redacted>
Wed, 24 Jan 2018 18:03:33 +0000 (19:03 +0100)
commitf6ef2ff72979fd6504b930d7db9506f35ce07d37
treed7b7fee028dfd6e2c9d9bee48dc5aa7cd37d18fa
parent14d3dfb79dca9e261dbebd5a381155e5a93ce0e0
fx2lafw: silence integer overflow compile warnings

Explicitly mark literals for control bitfield values as unsigned. This
avoids a compiler warning when the MSB gets set in assignments to a BYTE.

The warning was not seen with SDCC v3.3, but with v3.6.9:

  SDCC     fx2lafw.rel
  ./source/fx2lafw.c:66: warning 158: overflow in implicit constant conversion
  SDCC     gpif-acquisition.rel
  ./source/gpif-acquisition.c:65: warning 158: overflow in implicit constant conversion
fx2lafw.c
gpif-acquisition.c