mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 11:36:59 +03:00
warning-free compile
This commit is contained in:
@@ -89,7 +89,13 @@ extern struct mdnsd* glmDNSServer;
|
||||
extern log_level raop_loglevel;
|
||||
static log_level *loglevel = &raop_loglevel;
|
||||
|
||||
#ifdef WIN32
|
||||
static void* rtsp_thread(void *arg);
|
||||
static void* search_remote(void *args);
|
||||
#else
|
||||
static void rtsp_thread(void *arg);
|
||||
static void search_remote(void *args);
|
||||
#endif
|
||||
static void cleanup_rtsp(raop_ctx_t *ctx, bool abort);
|
||||
static bool handle_rtsp(raop_ctx_t *ctx, int sock);
|
||||
|
||||
@@ -97,7 +103,7 @@ static char* rsa_apply(unsigned char *input, int inlen, int *outlen, int mode);
|
||||
static int base64_pad(char *src, char **padded);
|
||||
static int base64_encode(const void *data, int size, char **str);
|
||||
static int base64_decode(const char *str, void *data);
|
||||
static void* search_remote(void *args);
|
||||
|
||||
|
||||
extern char private_key[];
|
||||
|
||||
@@ -352,7 +358,11 @@ bool raop_cmd(struct raop_ctx_s *ctx, raop_event_t event, void *param) {
|
||||
}
|
||||
|
||||
free(command);
|
||||
closesocket(sock);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#ifdef WIN32
|
||||
static void *rtsp_thread(void *arg) {
|
||||
@@ -397,9 +407,9 @@ static void *rtsp_thread(void *arg) {
|
||||
sock = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (sock != -1) closesocket(sock);
|
||||
|
||||
if (sock != -1) closesocket(sock);
|
||||
|
||||
#ifndef WIN32
|
||||
xTaskNotifyGive(ctx->joiner);
|
||||
vTaskSuspend(NULL);
|
||||
@@ -708,7 +718,7 @@ static void* search_remote(void *args) {
|
||||
|
||||
query_mDNS(ctx->active_remote.handle, "_dacp._tcp.local", 0, 0, &search_remote_cb, (void*) ctx);
|
||||
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -741,8 +751,6 @@ static void* search_remote(void *args) {
|
||||
}
|
||||
}
|
||||
|
||||
mdns_query_results_free(results);
|
||||
}
|
||||
mdns_query_results_free(results);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,8 +159,12 @@ static void buffer_reset(abuf_t *audio_buffer);
|
||||
static void buffer_release(abuf_t *audio_buffer);
|
||||
static void buffer_reset(abuf_t *audio_buffer);
|
||||
static void buffer_push_packet(rtp_t *ctx);
|
||||
static bool rtp_request_resend(rtp_t *ctx, seq_t first, seq_t last);
|
||||
static bool rtp_request_resend(rtp_t *ctx, seq_t first, seq_t last);
|
||||
static bool rtp_request_timing(rtp_t *ctx);
|
||||
static int seq_order(seq_t a, seq_t b);
|
||||
#ifdef WIN32
|
||||
static void *rtp_thread_func(void *arg);
|
||||
#else
|
||||
static void rtp_thread_func(void *arg);
|
||||
#endif
|
||||
|
||||
@@ -566,7 +570,11 @@ static void buffer_push_packet(rtp_t *ctx) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifdef WIN32
|
||||
static void *rtp_thread_func(void *arg) {
|
||||
#else
|
||||
static void rtp_thread_func(void *arg) {
|
||||
#endif
|
||||
@@ -621,8 +629,9 @@ static void *rtp_thread_func(void *arg) {
|
||||
unsigned rtptime;
|
||||
|
||||
// re-sent packet
|
||||
case 0x56: {
|
||||
pktp += 4;
|
||||
case 0x56: {
|
||||
pktp += 4;
|
||||
plen -= 4;
|
||||
}
|
||||
// fall through
|
||||
|
||||
@@ -696,7 +705,6 @@ static void *rtp_thread_func(void *arg) {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// NTP timing packet
|
||||
case 0x53: {
|
||||
@@ -713,8 +721,8 @@ static void *rtp_thread_func(void *arg) {
|
||||
}
|
||||
|
||||
/*
|
||||
The expected elapsed remote time should be exactly the same as
|
||||
elapsed local time between the two request, corrected by the
|
||||
elapsed local time between the two request, corrected by the
|
||||
drifting
|
||||
u64_t expected = ctx->timing.remote + MS2NTP(reference - ctx->timing.local);
|
||||
*/
|
||||
@@ -741,9 +749,9 @@ static void *rtp_thread_func(void *arg) {
|
||||
free(packet);
|
||||
LOG_INFO("[%p]: terminating", ctx);
|
||||
|
||||
#ifndef WIN32
|
||||
xTaskNotifyGive(ctx->joiner);
|
||||
#ifndef WIN32
|
||||
xTaskNotifyGive(ctx->joiner);
|
||||
vTaskSuspend(NULL);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user