Skip to content
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

warning: 'void udp_client_task(void*)' defined but not used [-Wunused… #1330

Merged
merged 2 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 examples/wifi-echo/server/esp32/main/EchoClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* limitations under the License.
*/

#ifdef CONFIG_ECHO_USE_CLIENT

#include "esp_event.h"
#include "esp_log.h"
#include "esp_system.h"
Expand Down Expand Up @@ -43,7 +45,6 @@ static const char * PAYLOAD = "Message from echo client!";

static void udp_client_task(void * pvParameters)
{
#if CONFIG_USE_ECHO_CLIENT
char rx_buffer[RX_LEN];
char host_ip[] = HOST_IP_ADDR;
int addr_family = 0;
Expand Down Expand Up @@ -108,13 +109,12 @@ static void udp_client_task(void * pvParameters)
}
}
vTaskDelete(NULL);
#endif
}

// The echo client assumes the platform's networking has been setup already
void startClient(void)
{
#if CONFIG_USE_ECHO_CLIENT
xTaskCreate(udp_client_task, "udp_client", 4096, (void *) AF_INET, 5, NULL);
#endif
}

#endif // CONFIG_USE_ECHO_CLIENT
2 changes: 2 additions & 0 deletions examples/wifi-echo/server/esp32/main/wifi-echo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ using namespace ::chip;
using namespace ::chip::DeviceLayer;

extern void startServer(SecureSessionMgr * transportIPv4, SecureSessionMgr * transportIPv6);
#if CONFIG_USE_ECHO_CLIENT
extern void startClient(void);
#endif // CONFIG_USE_ECHO_CLIENT

#if CONFIG_DEVICE_TYPE_M5STACK

Expand Down