From 43b72ea23c7886dd3d0af0d021a5f0685da55d92 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 12 Aug 2021 16:11:29 +0200 Subject: [PATCH] Silence some warnings (unused variables) when HAVE_NETPLAYDISCOVERY is not defined --- network/netplay/netplay_discovery.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index 7db928ad29..c402641418 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -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)