Compiling dhcp-4.0.3
COMAPI.C: In the function ' Dhcp_group_remove ':
COMAPI.C:425:15: Error: Variable ' status ' is set but not used [-werror=unused-but-set-variable]
isc_result_t status;
^
COMAPI.C: In the function ' Dhcp_control_signal_handler ':
COMAPI.C:514:25: Error: Variable ' control ' is set but not used [-werror=unused-but-set-variable]
dhcp_control_object_t *control;
^
COMAPI.C: In the function ' Dhcp_subnet_set_value ':
COMAPI.C:615:17: Error: Variable ' subnet ' is set but not used [-werror=unused-but-set-variable]
struct subnet *subnet;
^
COMAPI.C: In the function ' Dhcp_subnet_get_value ':
COMAPI.C:640:17: Error: Variable ' subnet ' is set but not used [-werror=unused-but-set-variable]
struct subnet *subnet;
^
COMAPI.C: In the function ' Dhcp_subnet_destroy ':
COMAPI.C:661:17: Error: Variable ' subnet ' is set but not used [-werror=unused-but-set-variable]
struct subnet *subnet;
^
COMAPI.C: In the function ' Dhcp_subnet_signal_handler ':
COMAPI.C:688:17: Error: Variable ' subnet ' is set but not used [-werror=unused-but-set-variable]
struct subnet *subnet;
^
COMAPI.C: In the function ' dhcp_subnet_stuff_values ':
COMAPI.C:714:17: Error: Variable ' subnet ' is set but not used [-werror=unused-but-set-variable]
struct subnet *subnet;
^
COMAPI.C: In the function ' Dhcp_shared_network_set_value ':
COMAPI.C:764:25: Error: Variable ' shared_network ' is set but not used [-werror=unused-but-set-variable]
struct Shared_network *shared_network;
^
COMAPI.C: In the function ' Dhcp_shared_network_get_value ':
COMAPI.C:790:25: Error: Variable ' shared_network ' is set but not used [-werror=unused-but-set-variable]
struct Shared_network *shared_network;
^
COMAPI.C: In the function ' Dhcp_shared_network_destroy ':
COMAPI.C:812:25: Error: Variable ' shared_network ' is set but not used [-werror=unused-but-set-variable]
struct Shared_network *shared_network;
^
COMAPI.C: In the function ' Dhcp_shared_network_signal_handler ':
COMAPI.C:852:25: Error: Variable ' shared_network ' is set but not used [-werror=unused-but-set-variable]
struct Shared_network *shared_network;
^
COMAPI.C: In the function ' dhcp_shared_network_stuff_values ':
COMAPI.C:878:25: Error: Variable ' shared_network ' is set but not used [-werror=unused-but-set-variable]
struct Shared_network *shared_network;
^
Cc1:all warnings being treated as errors
MAKE[2]: * * [COMAPI.O] Error 1
MAKE[2]: Leave directory "/usr/src/dhcp-4.0.3/common"
MAKE[1]: * * [all-recursive] Error 1
MAKE[1]: Leave directory "/usr/src/dhcp-4.0.3/common"
Make: * * [all-recursive] Error 1
Workaround:
Edit the-werror in the makefile file in all folders under the dhcp-4.0.3 directory to remove
For example, change the makefile file in the dhcp-4.0.3 level directory
will cflags =-g-o2-wall-werror-fno-strict-aliasing one of the -werror Remove
[Email protected] dhcp-4.0.3]# gedit Makefile
This article from "Dosom" blog, declined reprint!
COMAPI.C:425:15: Error: Variable ' status ' is set but not used [-werror=unused-but-set-variable]