diff --git a/src/knx/application_layer.cpp b/src/knx/application_layer.cpp index c7a3928..4688ada 100644 --- a/src/knx/application_layer.cpp +++ b/src/knx/application_layer.cpp @@ -247,7 +247,7 @@ void ApplicationLayer::dataSystemBroadcastIndication(HopCountType hopType, Prior popWord(propertyId, data + 3); popByte(testInfo[0], data + 4); popByte(testInfo[1], data + 5); - propertyId = (propertyId >> 4) & 0x0FFF;; + propertyId = (propertyId >> 4) & 0x0FFF; testInfo[0] &= 0x0F; _bau.systemNetworkParameterReadIndication(priority, hopType, secCtrl, objectType, propertyId, testInfo, sizeof(testInfo)); break; @@ -296,7 +296,7 @@ void ApplicationLayer::dataSystemBroadcastConfirm(HopCountType hopType, Priority popWord(propertyId, data + 3); popByte(testInfo[0], data + 4); popByte(testInfo[1], data + 5); - propertyId = (propertyId >> 4) & 0x0FFF;; + propertyId = (propertyId >> 4) & 0x0FFF; testInfo[0] &= 0x0F; _bau.systemNetworkParameterReadLocalConfirm(priority, hopType, secCtrl, objectType, propertyId, testInfo, sizeof(testInfo), status); break; diff --git a/src/knx/dptconvert.cpp b/src/knx/dptconvert.cpp index 12726b3..1a3b46a 100644 --- a/src/knx/dptconvert.cpp +++ b/src/knx/dptconvert.cpp @@ -505,7 +505,8 @@ bool busValueToTime(const uint8_t* payload, size_t payload_length, const Dpt& da if (hours > 23 || minutes > 59 || seconds > 59) return false; - struct tm tmp = {0}; + struct tm tmp; + memset(&tmp, 0, sizeof(tmp)); tmp.tm_hour = hours; tmp.tm_wday = weekDay; tmp.tm_min = minutes; @@ -528,7 +529,8 @@ bool busValueToDate(const uint8_t* payload, size_t payload_length, const Dpt& da if (year > 99 || month < 1 || month > 12 || day < 1) return false; - struct tm tmp = {0}; + struct tm tmp; + memset(&tmp, 0, sizeof(tmp)); year += year >= 90 ? 1900 : 2000; tmp.tm_mday = day; tmp.tm_year = year; @@ -726,7 +728,8 @@ bool busValueToDateTime(const uint8_t* payload, size_t payload_length, const Dpt if ((hours > 24 || minutes > 59 || seconds > 59)) return false; - struct tm tmp = {0}; + struct tm tmp; + memset(&tmp, 0, sizeof(tmp)); tmp.tm_sec = seconds; tmp.tm_min = minutes; tmp.tm_hour = hours; diff --git a/src/knx/interface_object.cpp b/src/knx/interface_object.cpp index 93d5077..38969d0 100644 --- a/src/knx/interface_object.cpp +++ b/src/knx/interface_object.cpp @@ -122,7 +122,7 @@ void InterfaceObject::command(PropertyID id, uint8_t* data, uint8_t length, uint if (prop == nullptr) { resultLength = 0; - return;; + return; } prop->command(data, length, resultData, resultLength); @@ -135,7 +135,7 @@ void InterfaceObject::state(PropertyID id, uint8_t* data, uint8_t length, uint8_ if (prop == nullptr) { resultLength = 0; - return;; + return; } prop->state(data, length, resultData, resultLength); diff --git a/src/knx/knx_value.cpp b/src/knx/knx_value.cpp index b671d11..2e5b355 100644 --- a/src/knx/knx_value.cpp +++ b/src/knx/knx_value.cpp @@ -601,7 +601,8 @@ struct tm KNXValue::timeValue() const } } - struct tm tmp = {0}; + struct tm tmp; + memset(&tmp, 0, sizeof(tmp)); return tmp; }