mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
Fix compiling with LWIP_NOASSERT defined
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
d80e84864e
commit
a56e61c942
@ -152,6 +152,7 @@ static err_t
|
||||
altcp_mbedtls_lower_connected(void *arg, struct altcp_pcb *inner_conn, err_t err)
|
||||
{
|
||||
struct altcp_pcb *conn = (struct altcp_pcb *)arg;
|
||||
LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */
|
||||
if (conn && conn->state) {
|
||||
LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn);
|
||||
/* upper connected is called when handshake is done */
|
||||
@ -437,6 +438,7 @@ altcp_mbedtls_bio_recv(void *ctx, unsigned char *buf, size_t len)
|
||||
u16_t copy_len;
|
||||
err_t err;
|
||||
|
||||
LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */
|
||||
if ((conn == NULL) || (conn->state == NULL)) {
|
||||
return MBEDTLS_ERR_NET_INVALID_CONTEXT;
|
||||
}
|
||||
@ -484,6 +486,7 @@ static err_t
|
||||
altcp_mbedtls_lower_sent(void *arg, struct altcp_pcb *inner_conn, u16_t len)
|
||||
{
|
||||
struct altcp_pcb *conn = (struct altcp_pcb *)arg;
|
||||
LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */
|
||||
LWIP_UNUSED_ARG(len);
|
||||
if (conn) {
|
||||
altcp_mbedtls_state_t *state = (altcp_mbedtls_state_t *)conn->state;
|
||||
@ -510,6 +513,7 @@ static err_t
|
||||
altcp_mbedtls_lower_poll(void *arg, struct altcp_pcb *inner_conn)
|
||||
{
|
||||
struct altcp_pcb *conn = (struct altcp_pcb *)arg;
|
||||
LWIP_UNUSED_ARG(inner_conn); /* for LWIP_NOASSERT */
|
||||
if (conn) {
|
||||
LWIP_ASSERT("pcb mismatch", conn->inner_conn == inner_conn);
|
||||
/* check if there's unreceived rx data */
|
||||
|
@ -536,6 +536,7 @@ static u8_t *get_file_data(const char *filename, int *file_size, int can_be_comp
|
||||
u8_t *buf;
|
||||
size_t r;
|
||||
int rs;
|
||||
LWIP_UNUSED_ARG(r); /* for LWIP_NOASSERT */
|
||||
inFile = fopen(filename, "rb");
|
||||
if (inFile == NULL) {
|
||||
printf("Failed to open file \"%s\"\n", filename);
|
||||
@ -629,8 +630,8 @@ static u8_t *get_file_data(const char *filename, int *file_size, int can_be_comp
|
||||
static void process_file_data(FILE *data_file, u8_t *file_data, size_t file_size)
|
||||
{
|
||||
size_t written, i, src_off = 0;
|
||||
|
||||
size_t off = 0;
|
||||
LWIP_UNUSED_ARG(written); /* for LWIP_NOASSERT */
|
||||
for (i = 0; i < file_size; i++) {
|
||||
LWIP_ASSERT("file_buffer_c overflow", off < sizeof(file_buffer_c) - 5);
|
||||
sprintf(&file_buffer_c[off], "0x%02x,", file_data[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user