From c66e5a4381529ae2281c370cda103ea83cd850e3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 15 Jul 2020 14:11:41 +0200 Subject: [PATCH] Fix GCC 10.1 warnings --- tasmota/xdrv_23_zigbee_5_converters.ino | 2 ++ tasmota/xdrv_23_zigbee_6_commands.ino | 6 ++++-- tasmota/xdrv_23_zigbee_7_statemachine.ino | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 4cba00500..26781d358 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -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) { diff --git a/tasmota/xdrv_23_zigbee_6_commands.ino b/tasmota/xdrv_23_zigbee_6_commands.ino index 1f6c4e3a1..40545f737 100644 --- a/tasmota/xdrv_23_zigbee_6_commands.ino +++ b/tasmota/xdrv_23_zigbee_6_commands.ino @@ -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 diff --git a/tasmota/xdrv_23_zigbee_7_statemachine.ino b/tasmota/xdrv_23_zigbee_7_statemachine.ino index 7b0c1adc6..fecf68fe9 100644 --- a/tasmota/xdrv_23_zigbee_7_statemachine.ino +++ b/tasmota/xdrv_23_zigbee_7_statemachine.ino @@ -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