[posix] remove duplicate otExitCodeToString definition (#4928)

This commit is contained in:
Moandor
2020-05-06 18:45:03 -07:00
committed by GitHub
parent f7a4d05219
commit 64dfe6349c
4 changed files with 5 additions and 45 deletions
+2
View File
@@ -88,6 +88,8 @@ target_compile_definitions(openthread-samr21
target_compile_options(openthread-samr21
PRIVATE
-Wno-implicit-function-declaration
-Wno-expansion-to-defined
${OT_CFLAGS}
)
+1
View File
@@ -105,6 +105,7 @@ target_link_libraries(openthread-ncp-ftd
PUBLIC
openthread-ftd
PRIVATE
${OT_PLATFORM_LIB}
${OT_MBEDTLS}
openthread-hdlc
openthread-spinel-ncp
-43
View File
@@ -108,46 +108,3 @@ exit:
return fd;
}
const char *otExitCodeToString(uint8_t aExitCode)
{
const char *retval = NULL;
switch (aExitCode)
{
case OT_EXIT_SUCCESS:
retval = "Success";
break;
case OT_EXIT_FAILURE:
retval = "Failure";
break;
case OT_EXIT_INVALID_ARGUMENTS:
retval = "InvalidArgument";
break;
case OT_EXIT_RADIO_SPINEL_INCOMPATIBLE:
retval = "RadioSpinelIncompatible";
break;
case OT_EXIT_RADIO_SPINEL_RESET:
retval = "RadioSpinelReset";
break;
case OT_EXIT_RADIO_SPINEL_NO_RESPONSE:
retval = "RadioSpinelNoResponse";
break;
case OT_EXIT_ERROR_ERRNO:
retval = strerror(errno);
break;
default:
assert(false);
retval = "UnknownExitCode";
break;
}
return retval;
}
+2 -2
View File
@@ -80,10 +80,10 @@ target_compile_options(samr21-driver
PUBLIC
-Werror
-Wno-unused-parameter
-Wno-implicit-function-declaration
-Wno-expansion-to-defined
-fno-strict-aliasing
PRIVATE
-Wno-implicit-function-declaration
-Wno-expansion-to-defined
${OT_CFLAGS}
)