COMAPI.C:425:15: Error: Variable ' status ' is set but not used [-werror=unused-but-set-variable]

Source: Internet
Author: User

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.