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

fix: warning no return statement in function returning non-void #30

Conversation

hideakitai
Copy link

Fixed the warning below by returning void instead of int because none of the related functions return anything.

In file included from Arduino_PF1550/src/PF1550.cpp:28:0:
Arduino_PF1550/src/PF1550/PF1550_IO_Portenta_H7.h: In member function 'virtual int PF1550_IO_Portenta_H7::derived_begin()':
Arduino_PF1550/src/PF1550/PF1550_IO_Portenta_H7.h:40:42: warning: no return statement in function returning non-void [-Wreturn-type]
   virtual int derived_begin() override { }
                                          ^

@CLAassistant
Copy link

CLAassistant commented Apr 12, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

Memory usage change @ c80c0cf

Board flash % RAM for global variables %
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7:target_core=cm4 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/BasicUsage
flash
% examples/BasicUsage
RAM for global variables
% examples/ReadWriteRegs
flash
% examples/ReadWriteRegs
RAM for global variables
%
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7:target_core=cm4 N/A N/A N/A N/A N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/BasicUsage<br>flash,%,examples/BasicUsage<br>RAM for global variables,%,examples/ReadWriteRegs<br>flash,%,examples/ReadWriteRegs<br>RAM for global variables,%
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:mbed_portenta:envie_m7:target_core=cm4,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,0,0.0,0,0.0,0,0.0,0,0.0

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Apr 12, 2024
@alrvid alrvid requested a review from aentinger May 13, 2024 09:21
@@ -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();
Copy link
Collaborator

@aentinger aentinger May 13, 2024

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?

Copy link
Author

@hideakitai hideakitai May 19, 2024

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.

Copy link
Author

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?

@hideakitai
Copy link
Author

Terminate this PR because there is no reaction from reviewer @aentinger

@hideakitai hideakitai closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants