[style] advance C++ language standard to C++11 (#5077)

This commit is contained in:
Jonathan Hui
2020-06-16 13:02:53 -07:00
committed by GitHub
parent b50f33365c
commit d81d769e68
5 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
Standard: Cpp11
TabWidth: 4
UseTab: Never
...
+10
View File
@@ -137,6 +137,8 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(NULL)
LOCAL_CPPFLAGS := \
-std=c++11 \
-pedantic-errors \
-Wno-non-virtual-dtor \
$(NULL)
@@ -342,6 +344,8 @@ LOCAL_CFLAGS := \
$(NULL)
LOCAL_CPPFLAGS := \
-std=c++11 \
-pedantic-errors \
-Wno-non-virtual-dtor \
$(NULL)
@@ -385,6 +389,8 @@ LOCAL_CFLAGS := \
$(NULL)
LOCAL_CPPFLAGS := \
-std=c++11 \
-pedantic-errors \
-Wno-non-virtual-dtor \
$(NULL)
@@ -422,6 +428,8 @@ LOCAL_CFLAGS := \
$(NULL)
LOCAL_CPPFLAGS := \
-std=c++11 \
-pedantic-errors \
-Wno-non-virtual-dtor \
$(NULL)
@@ -462,6 +470,8 @@ LOCAL_CFLAGS := \
$(NULL)
LOCAL_CPPFLAGS := \
-std=c++11 \
-pedantic-errors \
-Wno-non-virtual-dtor \
$(NULL)
+1 -1
View File
@@ -18,7 +18,7 @@
- C
- OpenThread uses and enforces the ISO9899:1999 (aka ISO C99, C99) C language standard as the minimum.
- C++
- OpenThread uses and enforces the ISO14882:2003 (aka ISO C++03, C++03) C++ language standard as the minimum.
- OpenThread uses and enforces the ISO14882:2011 (aka ISO C++11, C++11) C++ language standard as the minimum.
- Extensions
- Wherever possible, toolchain-specific (e.g GCC/GNU) extensions or the use of later standards shall be avoided or shall be leveraged through toolchain-compatibility preprocessor macros.
+1 -1
View File
@@ -227,7 +227,7 @@ AC_PROG_LIBTOOL
#
PROSPECTIVE_CFLAGS="-Wall -Wextra -Wshadow -Wundef -Wcast-align -Werror -Wno-error=undef -std=c99 -pedantic-errors"
PROSPECTIVE_CXXFLAGS="-Wall -Wextra -Wshadow -Wundef -Wcast-align -Werror -Wno-error=undef -std=gnu++98 -Wno-c++14-compat -fno-exceptions"
PROSPECTIVE_CXXFLAGS="-Wall -Wextra -Wshadow -Wundef -Wcast-align -Werror -Wno-error=undef -std=c++11 -Wno-c++14-compat -fno-exceptions -pedantic-errors"
AC_CACHE_CHECK([whether $CC is Clang],
[nl_cv_clang],
+5 -2
View File
@@ -64,9 +64,9 @@ static AlarmState sAlarmMilli;
static AlarmState sAlarmMicro;
static uint32_t sRandomState = 1;
static uint8_t sRadioTransmitPsdu[OT_RADIO_FRAME_MAX_SIZE];
static otRadioFrame sRadioTransmitFrame = {.mPsdu = sRadioTransmitPsdu};
static otRadioFrame sRadioTransmitFrame;
static uint8_t sRadioAckPsdu[OT_RADIO_FRAME_MAX_SIZE];
static otRadioFrame sRadioAckFrame = {.mPsdu = sRadioAckPsdu};
static otRadioFrame sRadioAckFrame;
static bool sResetWasRequested = false;
static otRadioState sRadioState = OT_RADIO_STATE_DISABLED;
@@ -86,6 +86,9 @@ void FuzzerPlatformInit(void)
sAlarmNow = 0;
memset(&sAlarmMilli, 0, sizeof(sAlarmMilli));
memset(&sAlarmMicro, 0, sizeof(sAlarmMicro));
sRadioTransmitFrame.mPsdu = sRadioTransmitPsdu;
sRadioAckFrame.mPsdu = sRadioAckPsdu;
}
void FuzzerPlatformProcess(otInstance *aInstance)