diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-16 16:57:29 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-16 16:57:29 (GMT) |
| commit | 7593fce2300c45d321ff47f31909d0fafe03bf68 (patch) | |
| tree | 7f315460f8d5a0a2f746be9fcc86961739ad88d2 | |
| parent | ef08150c118c5b01adbf52ceafa7a59f0f2860d7 (diff) | |
| download | tcl-7593fce2300c45d321ff47f31909d0fafe03bf68.zip tcl-7593fce2300c45d321ff47f31909d0fafe03bf68.tar.gz tcl-7593fce2300c45d321ff47f31909d0fafe03bf68.tar.bz2 | |
Prevent warning: tclUnixSock.c:1079:19: warning: unused variable 'size' [-Wunused-variable]
| -rw-r--r-- | unix/tclUnixSock.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index abd7fa6..43303f8 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -1016,8 +1016,8 @@ TcpGetOptionProc( if ((len == 0) || ((len > 1) && (optionName[1] == 's') && (strncmp(optionName, "-sockname", len) == 0))) { TcpFdList *fds; - address sockname; - socklen_t size; + address sockname; + socklen_t size; int found = 0; WaitForConnect(statePtr, NULL); @@ -1056,7 +1056,9 @@ TcpGetOptionProc( if ((len == 0) || ((len > 1) && (optionName[1] == 'k') && (strncmp(optionName, "-keepalive", len) == 0))) { - socklen_t size; +#if defined(SO_KEEPALIVE) + socklen_t size; +#endif int opt = 0; if (len == 0) { @@ -1074,7 +1076,9 @@ TcpGetOptionProc( if ((len == 0) || ((len > 1) && (optionName[1] == 'n') && (strncmp(optionName, "-nodelay", len) == 0))) { - socklen_t size; +#if defined(SOL_TCP) && defined(TCP_NODELAY) + socklen_t size; +#endif int opt = 0; if (len == 0) { |
