diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b59d1a35..f3642cff1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/script/cmake-build b/script/cmake-build index 02c56daf1..20bc9fd91 100755 --- a/script/cmake-build +++ b/script/cmake-build @@ -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[@]}" diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp index ad0417b0f..393dc5a0d 100644 --- a/src/core/meshcop/commissioner.cpp +++ b/src/core/meshcop/commissioner.cpp @@ -75,7 +75,7 @@ Commissioner::Commissioner(Instance &aInstance) , mJoinerCallback(nullptr) , mCallbackContext(nullptr) { - memset(mJoiners, 0, sizeof(mJoiners)); + memset(reinterpret_cast(mJoiners), 0, sizeof(mJoiners)); mCommissionerAloc.Clear(); mCommissionerAloc.mPrefixLength = 64; diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp index a73d1f721..03bb52fc8 100644 --- a/src/core/thread/network_data_leader_ftd.cpp +++ b/src/core/thread/network_data_leader_ftd.cpp @@ -69,7 +69,7 @@ void Leader::Reset(void) { LeaderBase::Reset(); - memset(mContextLastUsed, 0, sizeof(mContextLastUsed)); + memset(reinterpret_cast(mContextLastUsed), 0, sizeof(mContextLastUsed)); mContextUsed = 0; mContextIdReuseDelay = kContextIdReuseDelay; }