From 3d853e55348578c2ac9383e75a770d0fdcf0d9fb Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 22 Dec 2023 18:12:14 +0100 Subject: [PATCH] Fix warning about unused variable from getaddrinfo --- client/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.cpp b/client/main.cpp index 50e29c72..548ab4ef 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -75,7 +75,7 @@ void real_main() struct addrinfo * addresses; if (int err = getaddrinfo(server_address.c_str(), NULL, &hint, &addresses)) { - throw std::runtime_error("Unable to resolve address for " + server_address); + throw std::runtime_error("Unable to resolve address for " + server_address + ":" + gai_strerror(err)); } for (addrinfo *addr = addresses ; addr and not session; addr = addr->ai_next) {