Skip to content
Tcl Source Code View Ticket
Login

View Ticket

warnings on FreeBSD 4.8-STABLE

Closed / Accepted745844ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 23 years ago
Descriptionplain2003-05-30 00:39:18
First, when compiling with threads, the following 
compiler warning repeatedly appears:

../generic/../unix/tclUnixPort.h:571: warning: 
`inet_ntoa' redefined
/usr/include/arpa/inet.h:78: warning: this is the 
location of the previous definition

This is really bad because this warning shows up 
for nearly every file compiled on FreeBSD with 
threads enabled.

To fix this one line is needed in tclUnixPort.h, near 
line 571:

#undef inet_ntoa

Right before:

#define inet_ntoa(x)    TclpInetNtoa(x)

Here is another interesting warning:

./../unix/tclUnixInit.c: In function 
`TclpInitPlatform':
./../unix/tclUnixInit.c:188: warning: value 
computed is not used

And there are some more warnings in 
tclUnixFCmd.c:

./../unix/tclUnixFCmd.c: In function `DoCopyFile':
./../unix/tclUnixFCmd.c:424: warning: passing arg 
2 of `mknod' with different width due to prototype
./../unix/tclUnixFCmd.c:430: warning: passing arg 
2 of `mkfifo' with different width due to prototype
./../unix/tclUnixFCmd.c: In function 
`DoCreateDirectory':
./../unix/tclUnixFCmd.c:611: warning: passing arg 
1 of `umask' with different width due to prototype
./../unix/tclUnixFCmd.c:612: warning: passing arg 
1 of `umask' with different width due to prototype
./../unix/tclUnixFCmd.c:620: warning: passing arg 
2 of `mkdir' with different width due to prototype
./../unix/tclUnixFCmd.c: In function 
`DoRemoveDirectory':
./../unix/tclUnixFCmd.c:759: warning: passing arg 
2 of `chmod' with different width due to prototype
./../unix/tclUnixFCmd.c:788: warning: passing arg 
2 of `chmod' with different width due to prototype
./../unix/tclUnixFCmd.c: In function `CopyFileAtts':
./../unix/tclUnixFCmd.c:1095: warning: passing 
arg 2 of `chmod' with different width due to 
prototype
./../unix/tclUnixFCmd.c:1097: warning: passing 
arg 2 of `chmod' with different width due to 
prototype
./../unix/tclUnixFCmd.c: In function 
`SetPermissionsAttribute':
./../unix/tclUnixFCmd.c:1448: warning: passing 
arg 2 of `chmod' with different width due to 
prototype
mdejongplain2003-06-24 15:56:36
Logged In: YES 
user_id=90858

I checked in you inet_ntoa(x) fix, but I don't know what to do
about the others. I don't have a freebsd system to build on.
I suspect the warnings you are seeing related to chmod and
the other system calls have something to do with a mismatch
in the stat struct. Check into how it it getting defined inside
tcl.h for your system. These warnings don't show up on
my Linux box, so it seems like you will need to do some more
searching to identify the problem since it is specific to your
systems set of include files and defines.
Log in (anonymous is fine) to add a comment.