summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
commitf336629f658f0862b12cd860a4edae8b95449eb2 (patch)
treee38704da3f3289f90c91833bf10a8e91a3699088 /unix/tclUnixSock.c
parent254b4fa35fd51a8b78906d5d481f4e1c3901f8b2 (diff)
parent065483ce8b22e7da470427493d68f36e6a53b80b (diff)
downloadtcl-f336629f658f0862b12cd860a4edae8b95449eb2.zip
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.gz
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.bz2
merge 8.7
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 781ef33..6e27cc5 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -335,10 +335,8 @@ Tcl_GetHostName(void)
int
TclpHasSockets(
- Tcl_Interp *dummy) /* Not used. */
+ TCL_UNUSED(Tcl_Interp *))
{
- (void)dummy;
-
return TCL_OK;
}
@@ -624,12 +622,11 @@ TcpOutputProc(
static int
TcpCloseProc(
void *instanceData, /* The socket to close. */
- Tcl_Interp *dummy) /* For error reporting - unused */
+ TCL_UNUSED(Tcl_Interp *))
{
TcpState *statePtr = (TcpState *)instanceData;
int errorCode = 0;
TcpFdList *fds;
- (void)dummy;
/*
* Delete a file handler that may be active for this socket if this is a
@@ -686,13 +683,12 @@ TcpCloseProc(
static int
TcpClose2Proc(
void *instanceData, /* The socket to close. */
- Tcl_Interp *dummy, /* For error reporting. */
+ TCL_UNUSED(Tcl_Interp *),
int flags) /* Flags that indicate which side to close. */
{
TcpState *statePtr = (TcpState *)instanceData;
int readError = 0;
int writeError = 0;
- (void)dummy;
/*
* Shutdown the OS socket handle.
@@ -1107,11 +1103,10 @@ TcpWatchProc(
static int
TcpGetHandleProc(
void *instanceData, /* The socket state. */
- int direction, /* Not used. */
+ TCL_UNUSED(int) /*direction*/,
void **handlePtr) /* Where to store the handle. */
{
TcpState *statePtr = (TcpState *)instanceData;
- (void)direction;
*handlePtr = INT2PTR(statePtr->fds.fd);
return TCL_OK;
@@ -1132,12 +1127,8 @@ TcpGetHandleProc(
static void
TcpAsyncCallback(
void *clientData, /* The socket state. */
- int mask) /* Events of interest; an OR-ed combination of
- * TCL_READABLE, TCL_WRITABLE and
- * TCL_EXCEPTION. */
+ TCL_UNUSED(int) /*mask*/)
{
- (void)mask;
-
TcpConnect(NULL, (TcpState *)clientData);
}
@@ -1768,7 +1759,7 @@ Tcl_OpenTcpServerEx(
static void
TcpAccept(
void *data, /* Callback token. */
- int mask) /* Not used. */
+ TCL_UNUSED(int) /*mask*/)
{
TcpFdList *fds = (TcpFdList *)data; /* Client data of server socket. */
int newsock; /* The new client socket */
@@ -1777,7 +1768,6 @@ TcpAccept(
socklen_t len; /* For accept interface */
char channelName[SOCK_CHAN_LENGTH];
char host[NI_MAXHOST], port[NI_MAXSERV];
- (void)mask;
len = sizeof(addr);
newsock = accept(fds->fd, &addr.sa, &len);