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: > > On 2013-03-05, at 6:16 AM, Fabian Keil wrote: > > > 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, > > It does. > > > 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. > > So I removed "|| __APPLE_CC__" from the two ifdefs and indeed the warnings are no longer displayed. Great, please commit. > > I agree that these warnings look harmless, but if they can be > > trivially fixed we should probably do it. > > Are you happy that I commit the file with the removals or should > I test the installed build first. If I test, what should I be testing for? In theory all commits should be tested. If the commit doesn't affect the installation process, testing the binary without a complete re-installation should be sufficient. In this case you could verify that http://p.p/ still shows the same "This is Privoxy ..." message and that the regression tests still pass. Fuzzing around with gdb to reach the various error conditions and edge cases never hurts, but for a trivial commit like this I wouldn't do it myself. Removing the defines should only affect OS X and as you enable the code paths that have been used and tested on other platforms for years the risk seems pretty low to me. Fabian ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ 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) iQIcBAEBCAAGBQJRN0HYAAoJEGkYIpGLojccHzcQAIhVRAXdGNWRE/OSeiFE4QdD oex6nYh7yZ83Wj1B+qxjFskA+8E1oQJuDJ0mxSRP4y3QgvVYs4k4ni+rf0lAaZ1u qBhzcyP40L5CNuMSrAxLi2NFK9+5UqCspqoEYIhjVcHEb5/Nz51tqF7N+L0x/I6q pcnj7eNk4Ap3kN7Zon5JbaZZuU3icGCAQq6JM6k/paAjQZndfRKjqC8aFw+qP09v KajHBdEu/w9s0NNaJiE/Uo6XSUP4jmdtluzWjDsiW+52i1AKplQSELEI1vRVuxEc WYwNYLM3yLoID/3iHt/otZpY2Ijcal+WHUgxSV1zBYaZB0KFr01uffuO41S0t0Wc T2/xcsi6RFSfT80bcpDDNxuhkVsRTsZ4AEt7+frtc1Ac5RwveUkZDfPZ3TyHySe4 QoUjEZcBuzFUqdu/LH31v9XNbS69HQcx4oj3vIjKd++WIp79Eg+wCa5J9dbX1ulu mdB4QINNjbI2oYCw01QrZWBpzHyYJU7jhjM8VF3cjtnEBjaV/Y77wrs+FiB0cro8 3pe9Lhnf9BLRBGXl3wHpI0OojmPASilD3shJ4LG5nTuzcCe/bV0W6JUm3/umEEhs Knon70sT9aplLpMGbeyKrCfDydvmpaj8cjlH1y4HLYAxtvBE+RG8iIMhbhEj5rtn BSOZjffeIjX6ia6YSNZg =JduZ -----END PGP SIGNATURE-----