-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: warning no return statement in function returning non-void #30
fix: warning no return statement in function returning non-void #30
Conversation
Memory usage change @ c80c0cf
Click for full report table
Click for full report CSV
|
@@ -41,11 +41,11 @@ PF1550_IO::PF1550_IO(arduino::HardwareI2C * wire, uint8_t const i2c_addr) | |||
PUBLIC MEMBER FUNCTIONS | |||
******************************************************************************/ | |||
|
|||
int PF1550_IO::begin() | |||
void PF1550_IO::begin() | |||
{ | |||
_wire->begin(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hideakitai ☕ 👋
Instead of eliminating the return value altogether I think it makes more sense to also return the return code of _wire->begin();
and _wire->setClock(100000);
in case there's an error. Can you please adjust this PR to that end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aentinger Thanks. I think both arduino::HardwareI2C
(and TwoWire
) 's begin()
and setClock()
returns void
, so I made it void
. If I have any misunderstandings, please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aentinger What should I do about this one?
Terminate this PR because there is no reaction from reviewer @aentinger |
Fixed the warning below by returning
void
instead ofint
because none of the related functions return anything.