mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 22:27:47 +00:00
[posix] remove duplicate otExitCodeToString definition (#4928)
This commit is contained in:
@@ -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}
|
||||
)
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ target_link_libraries(openthread-ncp-ftd
|
||||
PUBLIC
|
||||
openthread-ftd
|
||||
PRIVATE
|
||||
${OT_PLATFORM_LIB}
|
||||
${OT_MBEDTLS}
|
||||
openthread-hdlc
|
||||
openthread-spinel-ncp
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -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}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user