diff options
author | Bevan Weiss <bevanweiss@users.noreply.github.com> | 2024-08-15 12:14:19 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-14 22:14:19 -0400 |
commit | c0edfbc4ea02d7d0fb5824a686b4376a05972266 (patch) | |
tree | 8c287118e2e50ddba5c910c4d704932a095fcdcc /klippy/extras/hx71x.py | |
parent | 3f2ef88eb9f8a24ba870933108b570da616428e2 (diff) | |
download | kutter-c0edfbc4ea02d7d0fb5824a686b4376a05972266.tar.gz kutter-c0edfbc4ea02d7d0fb5824a686b4376a05972266.tar.xz kutter-c0edfbc4ea02d7d0fb5824a686b4376a05972266.zip |
src: Current code produces warnings for possible value overflows. (#6665)
As the input values are uint8_t types, any shift may result in value loss.
Explicit promotion to the output type (uint32_t) keeps things safe.
Have also changed the int32_t in ads1220_read_adc to uint32_t, type
promotion and bit manipulation are a bit 'weird' on signed integers, so
keep it as an unsigned to align with following function call parameter type.
Have retained the prior explicit sign extension logic however.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'klippy/extras/hx71x.py')
0 files changed, 0 insertions, 0 deletions