From 7308f42a7af466e33430d06a81f81ae70f288221 Mon Sep 17 00:00:00 2001 From: Yoichi NAKAYAMA Date: Sun, 11 Mar 2012 12:37:38 +0900 Subject: [PATCH] Suppress compiler warning in CreateClientRequestPacket. It is a static function and is called with AF_INET or AF_INET6, so there is no real problem. (cherry picked from commit 1b38cc963aec8c6c45bcd33db5c5eeb2de21826a) --- upnp/src/ssdp/ssdp_ctrlpt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upnp/src/ssdp/ssdp_ctrlpt.c b/upnp/src/ssdp/ssdp_ctrlpt.c index 3489fd3..d2e3c7a 100644 --- a/upnp/src/ssdp/ssdp_ctrlpt.c +++ b/upnp/src/ssdp/ssdp_ctrlpt.c @@ -344,6 +344,8 @@ static int CreateClientRequestPacket( } else if (AddressFamily == AF_INET6) { rc = snprintf(TempBuf, sizeof(TempBuf), "HOST: [%s]:%d\r\n", SSDP_IPV6_LINKLOCAL, SSDP_PORT); + } else { + return UPNP_E_INVALID_ARGUMENT; } if (rc < 0 || (unsigned int) rc >= sizeof(TempBuf)) return UPNP_E_INTERNAL_ERROR;