Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed to int32 because of compiler error #13

Open
wants to merge 3 commits into
base: ci_dev
Choose a base branch
from

Conversation

derDieDasJojo
Copy link

Compiling the ci_dev branch I got the following error:

/home/pi/romi-cidev/libromi/libromi/src/hal/I2C.cpp: In member function ‘uint8_t romi::I2C::compute_checksum()’:
/home/pi/romi-cidev/libromi/libromi/src/hal/I2C.cpp:87:29: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
   87 |                         sum += buffer_[i];
      |                         ~~~~^~~~~~~~~~~~~

with the adjustments of this PR compiling was successfull. It should not have other side-effects because the sum is afterwards masked and converted to uint8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant