Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-10-26
22:34 • Closed ticket [da0005d2f8]: tclIO.c:8117:63 incompatible pointer type plus 7... artifact: d5d82215cf user: jan.nijtmans
19:26 • New ticket [da0005d2f8]. artifact: 7958a6d529 user: teclab

tclIO.c:8117:63 incompatible pointer type

Closed / Works For Meda0005d2f8b48b031f5899c45d6d2cdcaf1d86e9Created 2 years agoUpdated 2 years ago
Descriptionplain2024-10-26 19:26:48
With the new gcc.exe (Rev1, Built by MSYS2 project) 14.2.0 compiling gets an error:

_________________________________

D:/cm/tcltk86/rcompile/tcl/generic/tclIO.c:8117:63: error: passing argument 4 of 'setsockopt' from i
ncompatible pointer type [-Wincompatible-pointer-types]
 8117 |         setsockopt(tcpData->fds.fd, IPPROTO_TCP, TCP_NODELAY, &newMode, sizeof(newMode));
      |                                                               ^~~~~~~~
      |                                                               |
      |                                                               int *
In file included from D:/cm/tcltk86/rcompile/tcl/win/tclWinPort.h:51,
                 from D:/cm/tcltk86/rcompile/tcl/generic/tclPort.h:21,
                 from D:/cm/tcltk86/rcompile/tcl/generic/tclInt.h:36,
                 from D:/cm/tcltk86/rcompile/tcl/generic/tclIO.c:15:
D:/Programs/msys64/mingw64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is
 of type 'int *'
 1035 |   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optva
l,int optlen);
      |                                                                            ~~~~~~~~~~~~^~~~~
~
make: *** [Makefile:625: tclIO.o] Error 1

_________________________________


With the old gcc.exe (Rev6, Built by MSYS2 project) 13.2.0 this step passed but with warning:

E:/gitlab-runner/builds/Uyyf6o_gt/0/product/tcltk/rcompile/tcl/generic/tclIO.c:8117:63: warning: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 8117 |         setsockopt(tcpData->fds.fd, IPPROTO_TCP, TCP_NODELAY, &newMode, sizeof(newMode));
      |                                                               ^~~~~~~~
      |                                                               |
      |                                                               int *
In file included from E:/gitlab-runner/builds/Uyyf6o_gt/0/product/tcltk/rcompile/tcl/win/tclWinPort.h:51,
                 from E:/gitlab-runner/builds/Uyyf6o_gt/0/product/tcltk/rcompile/tcl/generic/tclPort.h:21,
                 from E:/gitlab-runner/builds/Uyyf6o_gt/0/product/tcltk/rcompile/tcl/generic/tclInt.h:36,
                 from E:/gitlab-runner/builds/Uyyf6o_gt/0/product/tcltk/rcompile/tcl/generic/tclIO.c:15:
C:/Programs/msys2/mingw64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
 1035 |   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
      |                                                                            ~~~~~~~~~~~~^~~~~~


_________________________________



Thank You!
jan.nijtmanswiki2024-10-26 22:34:08

I don't see any setsockopt() call in tclIO.c, only in tclWinSock.c. Not even on line 8117. So, I wonder where your tcltk comes from.

Log in (anonymous is fine) to add a comment.