Skip to content

Commit c80c0cf

Browse files
committed
fix: warning no return statement in function returning non-void
1 parent 0e3d8d4 commit c80c0cf

9 files changed

+13
-13
lines changed

src/PF1550.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ PF1550::PF1550(PF1550_IO & io)
4343
PUBLIC MEMBER FUNCTIONS
4444
******************************************************************************/
4545

46-
int PF1550::begin()
46+
void PF1550::begin()
4747
{
4848
if (_debug) {
4949
_debug->println("PF1550 begin");
5050
}
51-
return _control.begin();
51+
_control.begin();
5252
}
5353

5454
void PF1550::debug(Stream& stream)

src/PF1550.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class PF1550
4949

5050
PF1550(PF1550_IO & io);
5151

52-
int begin();
52+
void begin();
5353

5454
void debug(Stream& stream);
5555

src/PF1550/PF1550_Control.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ PF1550_Control::PF1550_Control(PF1550_IO & io)
4040
PUBLIC MEMBER FUNCTIONS
4141
******************************************************************************/
4242

43-
int PF1550_Control::begin()
43+
void PF1550_Control::begin()
4444
{
45-
return _io.begin();
45+
_io.begin();
4646
}
4747

4848
void PF1550_Control::debug(Stream& stream)

src/PF1550/PF1550_Control.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class PF1550_Control
4545
PF1550_Control(PF1550_IO & io);
4646

4747

48-
int begin();
48+
void begin();
4949
void debug(Stream& stream);
5050

5151
void setBit (Register const reg, uint8_t const bit_pos);

src/PF1550/PF1550_IO.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ PF1550_IO::PF1550_IO(arduino::HardwareI2C * wire, uint8_t const i2c_addr)
4141
PUBLIC MEMBER FUNCTIONS
4242
******************************************************************************/
4343

44-
int PF1550_IO::begin()
44+
void PF1550_IO::begin()
4545
{
4646
_wire->begin();
4747
_wire->setClock(100000);
48-
return derived_begin();
48+
derived_begin();
4949
}
5050

5151
void PF1550_IO::readRegister(Register const reg_addr, uint8_t * data)

src/PF1550/PF1550_IO.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class PF1550_IO
5050
void debug (Stream& stream) { _debug = &stream; }
5151

5252

53-
int begin();
53+
void begin();
5454

5555
void readRegister (Register const reg_addr, uint8_t * data);
5656
void writeRegister(Register const reg_addr, uint8_t const data);
@@ -60,7 +60,7 @@ class PF1550_IO
6060

6161

6262
protected:
63-
virtual int derived_begin() = 0;
63+
virtual void derived_begin() = 0;
6464

6565
private:
6666
arduino::HardwareI2C * _wire;

src/PF1550/PF1550_IO_C33.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PF1550_IO_C33 : public PF1550_IO
3939

4040

4141
protected:
42-
virtual int derived_begin() override
42+
virtual void derived_begin() override
4343
{
4444
/* Enable LED. */
4545
setBit(Register::CHARGER_LED_PWM, REG_LED_PWM_LED_EN_bp);

src/PF1550/PF1550_IO_Nicla_Vision.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PF1550_IO_Nicla_Vision : public PF1550_IO
3737

3838

3939
protected:
40-
virtual int derived_begin() override { }
40+
virtual void derived_begin() override { }
4141
};
4242

4343
#endif /* PF1550_IO_NICLA_VISION_H_ */

src/PF1550/PF1550_IO_Portenta_H7.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PF1550_IO_Portenta_H7 : public PF1550_IO
3737

3838

3939
protected:
40-
virtual int derived_begin() override { }
40+
virtual void derived_begin() override { }
4141
};
4242

4343
#endif /* PF1550_IO_ENVIEH747_H_ */

0 commit comments

Comments
 (0)