Skip to content

Commit bede9f4

Browse files
[TO REVIEW][nrf toup] Initialize routingRole to avoid warnings.
If the routingRole enum variable is not initilaized the compilator returns warning which may be treated as error. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
1 parent e963bd1 commit bede9f4

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

scripts/west/west-commands.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ west-commands:
2020
- name: zap-append
2121
class: ZapAppend
2222
help: Append a new custom cluster to the ZCL database
23+
- file: scripts/west/zap_update.py
24+
commands:
25+
- name: zap-update
26+
class: ZapUpdate
27+
help: Update and synchronize the ZAP and zcl.json files with the Matter SDK

scripts/west/zap_update.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ class ZapUpdate(WestCommand):
2222
def __init__(self):
2323
super().__init__(
2424
'zap-update',
25-
'Update the ZAP file with the new clusters',
25+
'Update and synchronize the ZAP and zcl.json files with the Matter SDK',
2626
dedent('''
27-
Update the ZAP file with the new clusters'''))
27+
Update and synchronize the ZAP and zcl.json files with the Matter SDK.
28+
29+
This command will update the ZAP file all changes from the Matter Data Model.
30+
If the zcl.json file is provided, it will be synchronized with the base zcl.json file in the Matter SDK and new clusters will be added to it.
31+
'''))
2832

2933
def do_add_parser(self, parser_adder):
3034
parser = parser_adder.add_parser(self.name,

src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, a
106106

107107
case Attributes::RoutingRole::Id: {
108108
using ThreadNetworkDiagnostics::RoutingRoleEnum;
109-
RoutingRoleEnum routingRole;
110-
otDeviceRole otRole = otThreadGetDeviceRole(otInst);
109+
RoutingRoleEnum routingRole = RoutingRoleEnum::kUnspecified;
110+
otDeviceRole otRole = otThreadGetDeviceRole(otInst);
111111

112112
if (otRole == OT_DEVICE_ROLE_DISABLED)
113113
{

0 commit comments

Comments
 (0)