HomeFreeBSD

net-p2p/verlihub: unbreak build with Clang 6 (C++14 by default)

Description

net-p2p/verlihub: unbreak build with Clang 6 (C++14 by default)

casyncconn.cpp:585:62: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int')

if(bind(sock, (struct sockaddr *)&mAddrIN, sizeof(mAddrIN)) == -1)
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~

creguserinfo.cpp:156:32: error: non-constant-expression cannot be narrowed from type 'char' to 'unsigned char' in initializer list [-Wc++11-narrowing]

unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]};
                             ^~~~~~~~~~~~~~~~

creguserinfo.cpp:156:32: note: insert an explicit cast to silence this issue

unsigned char charsalt[2] = {((char*)&str)[0],((char*)&str)[1]};
                             ^~~~~~~~~~~~~~~~
                             static_cast<unsigned char>( )

script_api.cpp:221:10: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool'

return false;
       ^~~~~

script_api.cpp:226:46: error: cannot initialize return object of type 'char *' with an rvalue of type 'bool'

if ((!usr) || (usr && !usr->mxConn)) return false;
                                            ^~~~~

Reported by: pkg-fallout (blocks 9 ports)
Approved by: portmgr blanket

Details

Provenance
jbeichAuthored on
Parents
rP459997: audio/libsidplay: unbreak build with Clang 6 (C++14 by default)
Branches
Unknown
Tags
Unknown