[r293629]: ip_fw_table_algo.c:3818:6: error: variable 'error' is used uninitialized whenever 'if' condition is false

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Sun, 10 Jan 2016 09:29:54 +0100
Kernel build fails with the error shown below:

[...]
--- all_subdir_ipfw ---
/usr/src/sys/modules/ipfw/../../netpfil/ipfw/ip_fw_table_algo.c:3818:6: error: variable
'error' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized] if (keylen == 4) { ^~~~~~~~~~~
/usr/src/sys/modules/ipfw/../../netpfil/ipfw/ip_fw_table_algo.c:3833:6: note:
uninitialized use occurs here if (error != 0)
            ^~~~~
/usr/src/sys/modules/ipfw/../../netpfil/ipfw/ip_fw_table_algo.c:3818:2: note: remove the
'if' if its condition is always true if (keylen == 4) {
        ^~~~~~~~~~~~~~~~~
/usr/src/sys/modules/ipfw/../../netpfil/ipfw/ip_fw_table_algo.c:3815:11: note: initialize
the variable 'error' to silence this warning int error;
                 ^
                  = 0
1 error generated.
*** [ip_fw_table_algo.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/ipfw
1 error

make[4]: stopped in /usr/src/sys/modules/ipfw
*** [all_subdir_ipfw] Error code 2
[...]



Kind regards,

oh

Received on Sun Jan 10 2016 - 07:30:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:02 UTC