Fix GCC 10.1 warnings

This commit is contained in:
Theo Arends 2020-07-15 14:11:41 +02:00
parent 23057c94ac
commit c66e5a4381
3 changed files with 9 additions and 4 deletions

View File

@ -1192,6 +1192,7 @@ int32_t Z_OccupancyCallback(uint16_t shortaddr, uint16_t groupaddr, uint16_t clu
JsonObject& json = jsonBuffer.createObject();
json[F(OCCUPANCY)] = 0;
zigbee_devices.jsonPublishNow(shortaddr, json);
return 0; // Fix GCC 10.1 warning
}
// Aqara Cube
@ -1420,6 +1421,7 @@ int32_t Z_ApplyConverter(const class ZCLFrame *zcl, uint16_t shortaddr, JsonObje
if (func) {
return (*func)(zcl, shortaddr, json, name, value, new_name, cluster, attr);
}
return 1; // Fix GCC 10.1 warning
}
void ZCLFrame::postProcessAttributes(uint16_t shortaddr, JsonObject& json) {

View File

@ -42,7 +42,7 @@ typedef struct Z_XYZ_Var { // Holds values for vairables X, Y and Z
ZF(AddGroup) ZF(ViewGroup) ZF(GetGroup) ZF(GetAllGroups) ZF(RemoveGroup) ZF(RemoveAllGroups)
ZF(AddScene) ZF(ViewScene) ZF(RemoveScene) ZF(RemoveAllScenes) ZF(RecallScene) ZF(StoreScene) ZF(GetSceneMembership)
//ZF(Power) ZF(Dimmer)
//ZF(Power) ZF(Dimmer)
ZF(DimmerUp) ZF(DimmerDown) ZF(DimmerStop)
ZF(ResetAlarm) ZF(ResetAllAlarms)
//ZF(Hue) ZF(Sat) ZF(CT)
@ -52,7 +52,7 @@ ZF(ShutterOpen) ZF(ShutterClose) ZF(ShutterStop) ZF(ShutterLift) ZF(ShutterTilt)
ZF(DimmerMove) ZF(DimmerStep) ZF(DimmerStepUp) ZF(DimmerStepDown)
ZF(HueMove) ZF(HueStep) ZF(HueStepUp) ZF(HueStepDown) ZF(SatMove) ZF(SatStep) ZF(ColorMove) ZF(ColorStep)
ZF(ColorTempMoveUp) ZF(ColorTempMoveDown) ZF(ColorTempMoveStop) ZF(ColorTempMove)
ZF(ColorTempStep) ZF(ColorTempStepUp) ZF(ColorTempStepDown)
ZF(ColorTempStep) ZF(ColorTempStepUp) ZF(ColorTempStepDown)
ZF(ArrowClick) ZF(ArrowHold) ZF(ArrowRelease) ZF(ZoneStatusChange)
ZF(xxxx00) ZF(xxxx) ZF(01xxxx) ZF(03xxxx) ZF(00) ZF(01) ZF() ZF(xxxxyy) ZF(00190200) ZF(01190200) ZF(xxyyyy) ZF(xx)
@ -189,6 +189,7 @@ int32_t Z_ReadAttrCallback(uint16_t shortaddr, uint16_t groupaddr, uint16_t clus
}
ZigbeeZCLSend_Raw(shortaddr, groupaddr, cluster, endpoint, ZCL_READ_ATTRIBUTES, false, 0, attrs, attrs_len, true /* we do want a response */, zigbee_devices.getNextSeqNumber(shortaddr));
}
return 0; // Fix GCC 10.1 warning
}
@ -197,6 +198,7 @@ int32_t Z_Unreachable(uint16_t shortaddr, uint16_t groupaddr, uint16_t cluster,
if (BAD_SHORTADDR != shortaddr) {
zigbee_devices.setReachable(shortaddr, false); // mark device as reachable
}
return 0; // Fix GCC 10.1 warning
}
// set a timer to read back the value in the future

View File

@ -838,7 +838,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
// wait for device to start
ZI_WAIT_UNTIL(5000, ZBR_RSTACK) // wait for RSTACK message
// Init device and probe version
ZI_SEND(ZBS_VERSION) ZI_WAIT_RECV_FUNC(1000, ZBR_VERSION, &EZ_ReceiveCheckVersion) // check EXT PAN ID
@ -886,7 +886,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
// ZI_GOTO(ZIGBEE_LABEL_CONFIGURE_EZSP)
// // Try networkInit to restore settings, and check if network comes up
ZI_ON_TIMEOUT_GOTO(ZIGBEE_LABEL_BAD_CONFIG) //
ZI_ON_TIMEOUT_GOTO(ZIGBEE_LABEL_BAD_CONFIG) //
ZI_ON_ERROR_GOTO(ZIGBEE_LABEL_BAD_CONFIG)
ZI_SEND(ZBS_NETWORK_INIT) ZI_WAIT_RECV(500, ZBR_NETWORK_INIT)
ZI_WAIT_RECV(1500, ZBR_NETWORK_UP) // wait for network to start
@ -1217,6 +1217,7 @@ int32_t ZigbeeProcessInput(class SBuffer &buf) {
// any other negative value means error
ZigbeeGotoLabel(zigbee.on_error_goto);
}
return 0; // Fix GCC 10.1 warning
}
#endif // USE_ZIGBEE