diff options
| author | dgp <dgp@users.sourceforge.net> | 2020-03-09 15:45:52 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2020-03-09 15:45:52 (GMT) |
| commit | 8816b1a873ea5b502c1fcefc3b56875e281f0458 (patch) | |
| tree | 6a5b73ea983c2195085a9dcec069012cf50d6a0e /unix/tclUnixSock.c | |
| parent | 1baa16d30dfb27a4df336268d8acae3af327054a (diff) | |
| download | tcl-8816b1a873ea5b502c1fcefc3b56875e281f0458.zip tcl-8816b1a873ea5b502c1fcefc3b56875e281f0458.tar.gz tcl-8816b1a873ea5b502c1fcefc3b56875e281f0458.tar.bz2 | |
TCL_UNUSED in the unix sources.
Diffstat (limited to 'unix/tclUnixSock.c')
| -rw-r--r-- | unix/tclUnixSock.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index dd8ca30..325e361 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -338,10 +338,8 @@ Tcl_GetHostName(void) int TclpHasSockets( - Tcl_Interp *dummy) /* Not used. */ + TCL_UNUSED(Tcl_Interp *)) { - (void)dummy; - return TCL_OK; } @@ -627,12 +625,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 @@ -689,13 +686,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. @@ -1110,11 +1106,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; @@ -1135,12 +1130,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); } @@ -1771,7 +1762,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 */ @@ -1780,7 +1771,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); |
