[build] fix warning of clearing non-trivial type (#5710)

This commit is contained in:
kangping
2020-10-27 23:10:56 +08:00
committed by GitHub
parent 8707b63894
commit 3de6b9a86a
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
gcc_ver: [5, 6, 7, 8, 9]
gcc_ver: [5, 6, 7, 8, 9, 10]
env:
CC: gcc-${{ matrix.gcc_ver }}
CXX: g++-${{ matrix.gcc_ver }}
+1 -1
View File
@@ -109,7 +109,7 @@ build()
mkdir -p "${builddir}"
cd "${builddir}"
cmake -GNinja "$@" "${OT_SRCDIR}"
cmake -GNinja -DOT_COMPILE_WARNING_AS_ERROR=ON "$@" "${OT_SRCDIR}"
if [[ -n ${OT_CMAKE_NINJA_TARGET[*]} ]]; then
ninja "${OT_CMAKE_NINJA_TARGET[@]}"
+1 -1
View File
@@ -75,7 +75,7 @@ Commissioner::Commissioner(Instance &aInstance)
, mJoinerCallback(nullptr)
, mCallbackContext(nullptr)
{
memset(mJoiners, 0, sizeof(mJoiners));
memset(reinterpret_cast<void *>(mJoiners), 0, sizeof(mJoiners));
mCommissionerAloc.Clear();
mCommissionerAloc.mPrefixLength = 64;
+1 -1
View File
@@ -69,7 +69,7 @@ void Leader::Reset(void)
{
LeaderBase::Reset();
memset(mContextLastUsed, 0, sizeof(mContextLastUsed));
memset(reinterpret_cast<void *>(mContextLastUsed), 0, sizeof(mContextLastUsed));
mContextUsed = 0;
mContextIdReuseDelay = kContextIdReuseDelay;
}