Skip to content

Commit 1a4a9d4

Browse files
[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 7dd01cc commit 1a4a9d4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)