Skip to content

TLSSocketWrapper: decouple error requirements #8687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions features/netsocket/TLSSocketWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,16 @@ nsapi_size_or_error_t TLSSocketWrapper::recvfrom(SocketAddress *address, void *d
return recv(data, size);
}

void TLSSocketWrapper::print_mbedtls_error(const char *name, int err)
void TLSSocketWrapper::print_mbedtls_error(MBED_UNUSED const char *name, MBED_UNUSED int err)
{
#ifdef MBEDTLS_ERROR_C
// Avoid pulling in mbedtls_strerror when trace is not enabled
#if defined FEA_TRACE_SUPPORT && defined MBEDTLS_ERROR_C
char *buf = new char[128];
mbedtls_strerror(err, buf, 128);
tr_err("%s() failed: -0x%04x (%d): %s", name, -err, err, buf);
delete[] buf;
#else
(void)name;
(void)err;
tr_err("%s() failed: -0x%04x (%d)", name, -err, err);
#endif
}

Expand Down