Dealing with GCC 6.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So we recently started compiling with gcc 5 and there's a new thing now
and we don't build on gcc 6.  I know it's just a development build, but
it finds new things, like:

fdstream.c: In function 'virFDStreamWrite':
fdstream.c:390:29: error: logical 'or' of equal expressions [-Werror=logical-op]
        if (errno == EAGAIN || errno == EWOULDBLOCK) {
                            ^~
fdstream.c: In function 'virFDStreamRead':
fdstream.c:440:29: error: logical 'or' of equal expressions [-Werror=logical-op]
        if (errno == EAGAIN || errno == EWOULDBLOCK) {
                            ^~

and

rpc/virnetsshsession.c: In function 'virNetSSHAuthenticateAgent':
rpc/virnetsshsession.c:548:56: error: logical 'and' of equal expressions [-Werror=logical-op]
        if (ret != LIBSSH2_ERROR_AUTHENTICATION_FAILED &&
                                                       ^~
rpc/virnetsshsession.c: In function 'virNetSSHAuthenticatePrivkey':
rpc/virnetsshsession.c:676:57: error: logical 'or' of equal expressions [-Werror=logical-op]
        if (ret == LIBSSH2_ERROR_PUBLICKEY_UNRECOGNIZED ||
                                                        ^~

The first one is prety easy to fix, that's the only place where we use
EWOULDBLOCK, we are using only EAGAIN everywhere else.  However, the
second one is not that easy to change for me as I'm not a libssh expert
and moreover, I would like to know other's opinions on how to tackle
that.  We can disable the logical-op warning, but it might show
something that makes sense (really?).  Or we can do bunch of very very
ugly "#if"s.

Anyone care to share an idea?

Have a nice day,
Martin

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]