Fix GCC 10.1 warnings

This commit is contained in:
Theo Arends 2020-07-15 11:04:29 +02:00
parent 214b227942
commit 608d05f0bb
2 changed files with 8 additions and 4 deletions

View File

@ -249,6 +249,7 @@ int Scd30GetCommand(int command_code, uint16_t *pvalue)
// else for Unknown command // else for Unknown command
break; break;
} }
return 0; // Fix GCC 10.1 warning
} }
int Scd30SetCommand(int command_code, uint16_t value) int Scd30SetCommand(int command_code, uint16_t value)
@ -291,6 +292,7 @@ int Scd30SetCommand(int command_code, uint16_t value)
// else for Unknown command // else for Unknown command
break; break;
} }
return 0; // Fix GCC 10.1 warning
} }
/*********************************************************************************************\ /*********************************************************************************************\

View File

@ -218,6 +218,7 @@ uint8_t AS3935TranslMinLightsInt(uint8_t min_lights) {
case 2: return 9; case 2: return 9;
case 3: return 16; case 3: return 16;
} }
return 0; // Fix GCC 10.1 warning
} }
uint8_t AS3935TranslIrq(uint8_t irq, uint8_t distance) { uint8_t AS3935TranslIrq(uint8_t irq, uint8_t distance) {
@ -231,6 +232,7 @@ uint8_t AS3935TranslIrq(uint8_t irq, uint8_t distance) {
else if (distance == 1) return 4; // Storm is Overhead else if (distance == 1) return 4; // Storm is Overhead
else return 1; // Lightning with Distance detected else return 1; // Lightning with Distance detected
} }
return 0; // Fix GCC 10.1 warning
} }
void AS3935CalcVrmsLevel(uint16_t &vrms, uint8_t &stage) void AS3935CalcVrmsLevel(uint16_t &vrms, uint8_t &stage)
@ -346,7 +348,7 @@ uint8_t AS3935GetDisturber() {
return AS3935ReadRegister(DISTURBER); return AS3935ReadRegister(DISTURBER);
} }
uint8_t AS3935SetDisturber(uint8_t stat) { void AS3935SetDisturber(uint8_t stat) {
AS3935WriteRegister(DISTURBER, stat); AS3935WriteRegister(DISTURBER, stat);
} }
@ -354,7 +356,7 @@ uint8_t AS3935GetMinLights() {
return AS3935ReadRegister(MIN_NUM_LIGH); return AS3935ReadRegister(MIN_NUM_LIGH);
} }
uint8_t AS3935SetMinLights(uint8_t stat) { void AS3935SetMinLights(uint8_t stat) {
AS3935WriteRegister(MIN_NUM_LIGH, stat); AS3935WriteRegister(MIN_NUM_LIGH, stat);
} }
@ -362,7 +364,7 @@ uint8_t AS3935GetNoiseFloor() {
return AS3935ReadRegister(NF_LEVEL); return AS3935ReadRegister(NF_LEVEL);
} }
uint8_t AS3935SetNoiseFloor(uint8_t noise) { void AS3935SetNoiseFloor(uint8_t noise) {
AS3935WriteRegister(NF_LEVEL , noise); AS3935WriteRegister(NF_LEVEL , noise);
} }
@ -372,7 +374,7 @@ uint8_t AS3935GetGain() {
return INDOORS; return INDOORS;
} }
uint8_t AS3935SetGain(uint8_t room) { void AS3935SetGain(uint8_t room) {
AS3935WriteRegister(AFE_GB, room); AS3935WriteRegister(AFE_GB, room);
} }