Skip to content

Commit

Permalink
api_msg: Fix unused local variable if LWIP_NETCONN_SEM_PER_THREAD=1
Browse files Browse the repository at this point in the history
2.1.3-esp: aa4f6e7 api_msg: Fix unused local variable if LWIP_NETCONN_SEM_PER_THREAD=1
  • Loading branch information
david-cermak committed Sep 11, 2024
1 parent fb0faa4 commit 6e7c96f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/api_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,9 +1278,9 @@ netconn_gethostbyname(const char *name, ip_addr_t *addr)
#endif
{
API_VAR_DECLARE(struct dns_api_msg, msg);
#if !LWIP_MPU_COMPATIBLE
#if !LWIP_MPU_COMPATIBLE && !LWIP_NETCONN_SEM_PER_THREAD
sys_sem_t sem;
#endif /* LWIP_MPU_COMPATIBLE */
#endif /* !LWIP_MPU_COMPATIBLE && !LWIP_NETCONN_SEM_PER_THREAD */
err_t err;
err_t cberr;

Expand Down Expand Up @@ -1308,7 +1308,9 @@ netconn_gethostbyname(const char *name, ip_addr_t *addr)
API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH - 1] = 0;
#else /* LWIP_MPU_COMPATIBLE */
msg.err = &err;
#if !LWIP_NETCONN_SEM_PER_THREAD
msg.sem = &sem;
#endif
API_VAR_REF(msg).addr = API_VAR_REF(addr);
API_VAR_REF(msg).name = name;
#endif /* LWIP_MPU_COMPATIBLE */
Expand Down

0 comments on commit 6e7c96f

Please sign in to comment.