Hi,

On Sat, Dec 17, 2016 at 11:16:10AM +0100, Steffan Karger wrote:
> > NAK to "-Wall -Werror", unless you've tested that this does not break
> > compilation on any of the supported platforms.
> 
> Sure, but I think we should help out with that.  Such as, do a test
> build on the supported platforms and see what fixes / extra flags we
> need to make it work.  (I say we, because although I don't have access
> to the build systems, I am willing to help out with fixing fallout.)
> 
> I'm willing to invest in this, because I think using the compiler as a
> sanity checker more will save us time in the long run.

I'm not generally disagreeing to add -Werror, but then we might consider
having either a --disable-strict setting, or something easily accessible
to certain platforms to disable it.

Right now I'm somewhat concerned about Solaris, and very concerned about
AIX - the latter is like a unix system built by people who have never seen
one, and only had hearsay about POSIX standards.  "Stuff does work", but
the header files are always just slightly different, and unless you spend
large amounts of time on special-case #ifdef TARGET_AIX, it's nearly
impossible to get rid of all warnings.

So, having "first class ports" that build with -Wall -Werror, and 
"second class ports" that can opt-out (because it's too painful to the 
code base as a whole to fix these) would work for me...

Taking 2.4_rc2 and building on AIX with -Wall -Wno-pointer-sign is
actually much less bad than I thought :-) - but there are things in 
there which are annoying, like these

../../../git/src/openvpn/route.c: In function 'add_route_ipv6':
../../../git/src/openvpn/route.c:1834:10: warning: variable 'gateway_needed' 
set but not used [-Wunused-but-set-variable]
     bool gateway_needed = false;
          ^

(fixing is easy, but implies adding an #ifdef TARGET_... orgy or 
refactoring this whole code part - which should be done, but won't 
happen "over night")

More problematic are these:

../../../git/src/openvpn/socket.c: In function 'print_link_socket_actual_ex':
../../../git/src/openvpn/socket.c:2802:21: warning: implicit declaration of 
function 'if_indextoname' [-Wimplicit-function-declaration]
                     if_indextoname(act->pi.in6.ipi6_ifindex, ifname);
                     ^
../../../git/src/openvpn/socket.c: In function 'unix_socket_get_peer_uid_gid':
../../../git/src/openvpn/socket.c:3950:5: warning: implicit declaration of 
function 'getpeereid' [-Wimplicit-function-declaration]
     if (getpeereid(sd, &u, &g) == -1)

../../../git/src/openvpn/tun.c: In function 'open_tun_generic':
../../../git/src/openvpn/tun.c:1787:13: warning: implicit declaration of 
function 'if_nametoindex' [-Wimplicit-function-declaration]
             if (if_nametoindex( dev ) > 0)

... since we're really not supposed to redeclare system prototypes
(and if we do, it will break on other versions of AIX).


-Werror is going to blow up in our faces if we do not fix ntlm.c first,
anyway :-)

gert


-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to