From 3d663e181100f7b386b04cd476a06fe733658aad Mon Sep 17 00:00:00 2001 From: Suvesh Pratapa <66088488+suveshpratapa@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:14:27 -0400 Subject: [PATCH] [ncp] use `SendCommand` with no `va_args` requirement to avoid compilation issues (#2443) Avoids an issue in `ncp_spinel.cpp` related to a dummy va_list variable being uninitialized. --- src/ncp/ncp_spinel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ncp/ncp_spinel.cpp b/src/ncp/ncp_spinel.cpp index f80f3627114..4cc85ce5119 100644 --- a/src/ncp/ncp_spinel.cpp +++ b/src/ncp/ncp_spinel.cpp @@ -190,12 +190,10 @@ void NcpSpinel::ThreadErasePersistentInfo(AsyncTaskPtr aAsyncTask) { otError error = OT_ERROR_NONE; spinel_tid_t tid = GetNextTid(); - va_list args; VerifyOrExit(mThreadErasePersistentInfoTask == nullptr, error = OT_ERROR_BUSY); - SuccessOrExit(error = - mSpinelDriver->SendCommand(SPINEL_CMD_NET_CLEAR, SPINEL_PROP_LAST_STATUS, tid, nullptr, args)); + SuccessOrExit(error = mSpinelDriver->SendCommand(SPINEL_CMD_NET_CLEAR, SPINEL_PROP_LAST_STATUS, tid)); mWaitingKeyTable[tid] = SPINEL_PROP_LAST_STATUS; mCmdTable[tid] = SPINEL_CMD_NET_CLEAR;