[ipv6calc] ipv6calc-0.97.4 bug report

Peter Bieringer pb at bieringer.de
Thu Nov 27 08:08:03 CET 2014

Hi David,

thank you for the report.

Am 25.11.2014 um 12:16 schrieb David Binderman:
> Hello there,
> ipv6calcoptions.c:80:22: error: sizeof on array function parameter will return size of 'const struct option *' instead of 'const struct option []' [-Werror,-Wsizeof-array-argument]

Which compiler do yo use, mine (gcc-4.8.3-7.fc20) is not supporting this
extra warning option.

> Source code is
>     if (*maxentries_p + MAXENTRIES_ARRAY(longopts_custom)>= (MAXLONGOPTIONS - 1)) {

investigating the code I found that the macro is not working at all as
expected, so the warning is proper.
Also the value is already passed via function argument, so simply
replace the line with

if (*maxentries_p + longopts_custom_entries >= (MAXLONGOPTIONS - 1)) {

Lastest CVS has this fix now included.

Hope this helps!


More information about the ipv6calc mailing list