Silence some warnings (unused variables) when HAVE_NETPLAYDISCOVERY

is not defined
This commit is contained in:
twinaphex 2021-08-12 16:11:29 +02:00
parent fbeb157bba
commit 43b72ea23c
1 changed files with 8 additions and 1 deletions

View File

@ -75,15 +75,21 @@ struct ad_packet
struct netplay_room *netplay_room_list = NULL;
int netplay_room_count = 0;
#ifdef HAVE_NETPLAYDISCOVERY
/* TODO/FIXME - static globals */
/* LAN discovery sockets */
static int lan_ad_server_fd = -1;
static int lan_ad_client_fd = -1;
/* Packet buffer for advertisement and responses */
static struct ad_packet ad_packet_buffer;
/* List of discovered hosts */
static struct netplay_host_list discovered_hosts;
static size_t discovered_hosts_allocated;
#endif
#ifdef HAVE_SOCKET_LEGACY
@ -169,7 +175,8 @@ static bool netplay_lan_ad_client(void)
}
#endif
else continue;
else
continue;
/* Allocate space for it */
if (discovered_hosts.size >= discovered_hosts_allocated)