Sfoglia il codice sorgente

civetweb.c: fix ifdef checks for TCP_USER_TIMEOUT

Fix for:

 [src/civetweb.c:7521]: (style) Variable 'uto' is assigned a value
 that is never used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf 10 anni fa
parent
commit
b3a9ea02d0
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/civetweb.c

+ 2 - 0
src/civetweb.c

@@ -7518,7 +7518,9 @@ static int set_sock_timeout(SOCKET sock, int milliseconds)
 #ifdef _WIN32
     DWORD t = milliseconds;
 #else
+#if defined(TCP_USER_TIMEOUT)
     unsigned int uto = (unsigned int)milliseconds;
+#endif
     struct timeval t;
     t.tv_sec = milliseconds / 1000;
     t.tv_usec = (milliseconds * 1000) % 1000000;