pbiering / ipv6calc

ipv6calc
https://www.deepspace6.net/projects/ipv6calc.html
Other
45 stars 15 forks source link

Build problem on FreeBSD #2

Closed dbaio closed 7 years ago

dbaio commented 7 years ago

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.
pbiering commented 7 years ago

Looks like you're using 'clang' which as a new option still not supported by 'gcc' Fixed in https://github.com/pbiering/ipv6calc/commit/cf1cda5e94e6e8cfd747d1569b93a56ee263ee7c#diff-6fc5a09b475bc1e59a7679e6f24c01a9

dbaio commented 7 years ago

thank you

pbiering commented 7 years ago

fixed in release https://github.com/pbiering/ipv6calc/releases/tag/0.99.2