Skip to content

Commit dd91aeb

Browse files
authored
Library & CI maintenance (#1394)
1 parent 397b70f commit dd91aeb

File tree

180 files changed

+206
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+206
-185
lines changed

.ci/arduino.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!groovy
22
def buildArduino(config, String buildFlags, String sketch, String key) {
3-
def root = '/opt/arduino-1.8.9/'
3+
def root = '/opt/arduino-1.8.12/'
44
def build_path = 'build'
55
def build_path_cmd = ' -build-path '+build_path+' '
66
if (config.nightly_arduino_ide)

.ci/static_analysis.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ def cppCheck(config) {
2323
violationConfigs: [[pattern: '.*/cppcheck-avr\\.xml$', parser: 'CPPCHECK', reporter: 'Cppcheck'],]
2424
]
2525
])
26+
// 20200226TK: Adjusted for CppCheck 1.90
2627
ret = sh(returnStatus: true,
2728
script: "#!/bin/bash +e\n"+
2829
"cd ${config.repository_root}\n"+
29-
"grep -q \"<td>0</td><td>total</td>\" cppcheck-avr_cppcheck_reports/index.html || exit_code=\$?\n"+
30+
"grep -q \"0 total\" cppcheck-avr_cppcheck_reports/index.html || exit_code=\$?\n"+
3031
"exit \$((exit_code == 0 ? 0 : 1))")
3132
if (ret == 1) {
3233
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (Code analysis - Cppcheck)', 'Issues found', '${BUILD_URL}CppCheck_20AVR/index.html')

MyASM.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

MyConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

MySensors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyCapabilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyEepromAddresses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyGatewayTransportEthernet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ bool gatewayTransportInit(void)
245245
return true;
246246
}
247247

248+
// cppcheck-suppress constParameter
248249
bool gatewayTransportSend(MyMessage &message)
249250
{
250251
int nbytes = 0;

core/MyGatewayTransportMQTTClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -110,6 +110,7 @@ static bool _MQTT_connecting = true;
110110
static bool _MQTT_available = false;
111111
static MyMessage _MQTT_msg;
112112

113+
// cppcheck-suppress constParameter
113114
bool gatewayTransportSend(MyMessage &message)
114115
{
115116
if (!_MQTT_client.connected()) {

core/MyGatewayTransportSerial.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -30,6 +30,7 @@ char _serialInputString[MY_GATEWAY_MAX_RECEIVE_LENGTH]; // A buffer for incom
3030
uint8_t _serialInputPos;
3131
MyMessage _serialMsg;
3232

33+
// cppcheck-suppress constParameter
3334
bool gatewayTransportSend(MyMessage &message)
3435
{
3536
setIndication(INDICATION_GW_TX);

core/MyHelperFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyHelperFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyInclusionMode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyInclusionMode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyIndication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyIndication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyLeds.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyLeds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyMessage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyMessage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyOTAFirmwareUpdate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -246,8 +246,8 @@ LOCAL bool _firmwareResponse(uint16_t block, uint8_t *data)
246246
sprintf_P(prbuf,PSTR("%04" PRIX16 ":"), (uint16_t)addr);
247247
MY_SERIALDEVICE.print(prbuf);
248248
for(uint8_t i=0; i<FIRMWARE_BLOCK_SIZE; i++) {
249-
uint8_t data = _flash_readByte(addr + i);
250-
sprintf_P(prbuf,PSTR("%02" PRIX8 ""), (uint8_t)data);
249+
uint8_t dataByte = _flash_readByte(addr + i);
250+
sprintf_P(prbuf,PSTR("%02" PRIX8 ""), dataByte);
251251
MY_SERIALDEVICE.print(prbuf);
252252
}
253253
OTA_DEBUG(PSTR("\n"));

core/MyOTAFirmwareUpdate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyOTALogging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyOTALogging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyPrivateConfig.h.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MyProtocol.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -88,7 +88,7 @@ bool protocolSerial2MyMessage(MyMessage &message, char *inputString)
8888
return (index == 5);
8989
}
9090

91-
char *protocolMyMessage2Serial(MyMessage &message)
91+
char *protocolMyMessage2Serial(const MyMessage &message)
9292
{
9393
(void)snprintf_P(_fmtBuffer, (uint8_t)MY_GATEWAY_MAX_SEND_LENGTH,
9494
PSTR("%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%" PRIu8 ";%s\n"), message.getSender(),
@@ -97,7 +97,7 @@ char *protocolMyMessage2Serial(MyMessage &message)
9797
return _fmtBuffer;
9898
}
9999

100-
char *protocolMyMessage2MQTT(const char *prefix, MyMessage &message)
100+
char *protocolMyMessage2MQTT(const char *prefix, const MyMessage &message)
101101
{
102102
(void)snprintf_P(_fmtBuffer, (uint8_t)MY_GATEWAY_MAX_SEND_LENGTH,
103103
PSTR("%s/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 "/%" PRIu8 ""), prefix,

core/MyProtocol.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -28,6 +28,11 @@
2828
bool protocolSerial2MyMessage(MyMessage &message, char *inputString);
2929

3030
// Format MyMessage to the protocol representation
31-
char *protocolMyMessage2Serial(MyMessage &message);
31+
char *protocolMyMessage2Serial(const MyMessage &message);
32+
33+
char *protocolMyMessage2MQTT(const char *prefix, const MyMessage &message);
34+
35+
bool protocolMQTT2MyMessage(MyMessage &message, char *topic, uint8_t *payload,
36+
const unsigned int length);
3237

3338
#endif

core/MySensorsCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -310,7 +310,7 @@ controllerConfig_t getControllerConfig(void)
310310
return _coreConfig.controllerConfig;
311311
}
312312

313-
313+
// cppcheck-suppress constParameter
314314
bool _sendRoute(MyMessage &message)
315315
{
316316
#if defined(MY_CORE_ONLY)

core/MySensorsCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

core/MySigning.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org
@@ -193,6 +193,7 @@ bool signerCheckTimer(void)
193193
return signerBackendCheckTimer();
194194
}
195195

196+
// cppcheck-suppress constParameter
196197
bool signerSignMsg(MyMessage &msg)
197198
{
198199
#if defined(MY_SIGNING_FEATURE)
@@ -263,6 +264,7 @@ bool signerSignMsg(MyMessage &msg)
263264

264265
}
265266

267+
// cppcheck-suppress constParameter
266268
bool signerVerifyMsg(MyMessage &msg)
267269
{
268270
bool verificationResult = true;
@@ -351,6 +353,7 @@ int signerMemcmp(const void* a, const void* b, size_t sz)
351353

352354
#if defined(MY_SIGNING_FEATURE)
353355
// Helper function to centralize signing/verification exceptions
356+
// cppcheck-suppress constParameter
354357
static bool skipSign(MyMessage &msg)
355358
{
356359
bool ret = false;
@@ -394,6 +397,7 @@ static void prepareSigningPresentation(MyMessage &msg, uint8_t destination)
394397
}
395398

396399
// Helper to process presentation messages
400+
// cppcheck-suppress constParameter
397401
static bool signerInternalProcessPresentation(MyMessage &msg)
398402
{
399403
const uint8_t sender = msg.getSender();
@@ -508,6 +512,7 @@ static bool signerInternalProcessPresentation(MyMessage &msg)
508512
}
509513

510514
// Helper to process nonce request messages
515+
// cppcheck-suppress constParameter
511516
static bool signerInternalProcessNonceRequest(MyMessage &msg)
512517
{
513518
#if defined(MY_SIGNING_FEATURE)
@@ -537,6 +542,7 @@ static bool signerInternalProcessNonceRequest(MyMessage &msg)
537542
}
538543

539544
// Helper to process nonce response messages
545+
// cppcheck-suppress constParameter
540546
static bool signerInternalProcessNonceResponse(MyMessage &msg)
541547
{
542548
#if defined(MY_SIGNING_FEATURE)

core/MySigning.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* network topology allowing messages to be routed to nodes.
77
*
88
* Created by Henrik Ekblad <[email protected]>
9-
* Copyright (C) 2013-2019 Sensnology AB
9+
* Copyright (C) 2013-2020 Sensnology AB
1010
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
1111
*
1212
* Documentation: http://www.mysensors.org

0 commit comments

Comments
 (0)