pbiering/ipv6calc

Build problem on FreeBSD

Closed this issue · 3 comments

dbaio commented

Hi, I got this when trying to build 0.99.1 on FreeBSD 12 current:

ipv6calc.c:1212:26: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
} else if ( (inputtype == FORMAT_mac) ) {
~~~~~~~~~~^~~~~~~~~~~~~
ipv6calc.c:1212:26: note: remove extraneous parentheses around the comparison to silence this warning
} else if ( (inputtype == FORMAT_mac) ) {
~ ^ ~
ipv6calc.c:1212:26: note: use '=' to turn this equality comparison into an assignment
} else if ( (inputtype == FORMAT_mac) ) {
^~
=
ipv6calc.c:1214:26: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
} else if ( (inputtype == FORMAT_eui64) ) {
~~~~~~~~~~^~~~~~~~~~~~~~~
ipv6calc.c:1214:26: note: remove extraneous parentheses around the comparison to silence this warning
} else if ( (inputtype == FORMAT_eui64) ) {
~ ^ ~
ipv6calc.c:1214:26: note: use '=' to turn this equality comparison into an assignment
} else if ( (inputtype == FORMAT_eui64) ) {
^~
=
2 errors generated.

After removing parentheses, it builded fine.

Regards.

Looks like you're using 'clang' which as a new option still not supported by 'gcc'
Fixed in cf1cda5#diff-6fc5a09b475bc1e59a7679e6f24c01a9

dbaio commented

thank you