Re: Compilation warnings in jbsockets.c

Fabian Keil <[email protected]>
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <[email protected]>
Ian Silvester <[email protected]> wrote:

> Ever since I started handling the OS X builds I've had the following warnings when building (regardless of architecture being targeted):
> 
> gcc -c -pipe  -I/usr/local/include/ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -mmacosx-version-min=10.4   -Dunix -Wall   jbsockets.c -o jbsockets.o
> jbsockets.c: In function ‘get_host_information’:
> jbsockets.c:1063: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness
> jbsockets.c: In function ‘accept_connection’:
> jbsockets.c:1291: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
> 
> I've kept meaning to post them in case its important that the code
> is modified to avoid them, though it doesn't appear to be important to me.

In both cases the type of the third arguments depends on whether
or not __APPLE_CC__ is defined because apparently that was useful
in 2002.

If your gcc defines it, you could try removing the two checks
to get a proper socklen_t. If it doesn't, you could add a define
to "downgrade" the type to int.

I agree that these warnings look harmless, but if they can be
trivially fixed we should probably do it.

Fabian

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Ijbswa-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ijbswa-developers
signature.asc (application/pgp-signature, 834 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBCAAGBQJRNdQAAAoJEGkYIpGLojcc9/YP/3KwQsPsAz8lf1c0/8F8gxtO
jTc0izyTZAO9XODA5YYGcA8LQd1VKqiwujymnchH1xfIuBGuYcMkhLMhtZwD9Qmo
Qzm4e8SaCRyKTDVDn/X0xAnKXWqaipLDww1GjJa71MKiMYBcRsix6qcgkqmdqFvw
9giFu75YGwg1SXZWI6UsgEV6Cf0RBRfw51YVhpVZbiVzRRevLNRotwPyEZw0lxe2
SHndbHRiZBS3pNbuhFAMAI26FbvJ6bjkDN4TRUUHXBmNwqc4lJjrPLIaNqT005wQ
YFAWby7qubGOYqYKtzXcZO7qOCELKZ62Xuc3Qw6DQ9BasGupagf2dAglugi5ap9g
g/Xt9JCA2aDPNMpg5SUSF8WAyGULdYaFH1ca3UNcpLskdRB9OlgZgnl3I0Tfi7/L
MYRjmVgeZ42/HuInfFy7gLbtU+X7LArvFDWSpGWbYPaQl6PSZ6iarWF33f/4ixW5
OxwIyPEarm7egZgaMQjnDtElFVm6QoQLgGnlGR6PYDBunLw1tVOLrO4QX5pzrB49
MzYt1QK4Oo7KtuSobCvSs/Bc+t9n8zZeHyMl5dd9xYO++ET5SJLZ82TjC2YDprmo
XJFAt4JhzKyOujYOK+wavK4orF0KzqGFLTYHdLD8N+QETs9x+AD/vQisl/frP1Bw
k9x407oob4jEHHAjlxP6
=ey9C
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.