Skip to content

Commit

Permalink
Fix an issue in ncp_spinel.cpp related to a dummy va_list variable …
Browse files Browse the repository at this point in the history
…being uninitialized. It causes problems with certain architectures and compiler flags, and initializing it using va_start doesn't work since it's not in a variadic function.
  • Loading branch information
suveshpratapa committed Jul 25, 2024
1 parent 2325a35 commit e090018
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ncp/ncp_spinel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ void NcpSpinel::GetDeviceRole(GetDeviceRoleHandler aHandler)
{
otError error = OT_ERROR_NONE;
spinel_tid_t tid = GetNextTid();
va_list args;
va_list args = {};

error = mSpinelDriver->SendCommand(SPINEL_CMD_PROP_VALUE_GET, SPINEL_PROP_NET_ROLE, tid, nullptr, args);

if (error != OT_ERROR_NONE)
{
FreeTid(tid);
Expand Down

0 comments on commit e090018

Please sign in to comment.