From 111ef8a4577478c741d5ba2802dcd8f877e50afb Mon Sep 17 00:00:00 2001 From: Nikolay Borodin Date: Wed, 30 Oct 2024 17:03:50 +0200 Subject: [PATCH] Fix: compiler throws an error when wanaddr is not used --- lib/netplay/port_mapping_manager_impl_miniupnpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netplay/port_mapping_manager_impl_miniupnpc.cpp b/lib/netplay/port_mapping_manager_impl_miniupnpc.cpp index 0b01f5dca83..9550b599bb6 100644 --- a/lib/netplay/port_mapping_manager_impl_miniupnpc.cpp +++ b/lib/netplay/port_mapping_manager_impl_miniupnpc.cpp @@ -132,8 +132,8 @@ static PortMappingImpl_Miniupnpc::DiscoveryStatus upnp_discover(DiscoveryResults return PortMappingImpl_Miniupnpc::DiscoveryStatus::UPNP_ERROR_DEVICE_NOT_FOUND; } - char wanaddr[64] = {}; #if defined(MINIUPNPC_API_VERSION) && (MINIUPNPC_API_VERSION >= 18) + char wanaddr[64] = {}; int validIGDResult = UPNP_GetValidIGD(devlist, &output.urls, &output.data, output.lanaddr, sizeof(output.lanaddr), wanaddr, sizeof(wanaddr)); #else int validIGDResult = UPNP_GetValidIGD(devlist, &output.urls, &output.data, output.lanaddr, sizeof(output.lanaddr));