From d8db511257003e107528ff9c12ac2df5af13361b Mon Sep 17 00:00:00 2001 From: Erik Kline Date: Tue, 10 Feb 2015 09:25:33 +0900 Subject: Remove set but not used variable Bug: 19245503 Change-Id: I57002952eadf4d5b7636e78fc0846c915cceb5dd --- dhcp.c | 2 -- dhcpcd_test.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dhcp.c b/dhcp.c index 4ff562c..5e9cf9b 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1306,7 +1306,6 @@ ssize_t configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp, const struct if_options *ifo) { - unsigned int i; const uint8_t *p; int pl; struct in_addr addr; @@ -1349,7 +1348,6 @@ configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp, net.s_addr = get_netmask(addr.s_addr); setvar(&ep, prefix, "subnet_mask", inet_ntoa(net)); } - i = inet_ntocidr(net); snprintf(cidr, sizeof(cidr), "%d", inet_ntocidr(net)); setvar(&ep, prefix, "subnet_cidr", cidr); if (get_option_addr(&brd, dhcp, DHO_BROADCAST) == -1) { diff --git a/dhcpcd_test.cpp b/dhcpcd_test.cpp index 1fa829f..a254d4d 100644 --- a/dhcpcd_test.cpp +++ b/dhcpcd_test.cpp @@ -97,9 +97,9 @@ class DhcpcdGetOptionTest : public ::testing::Test { } struct dhcp_message dhcpmsgs[2]; - size_t type_index; - size_t length_index; - size_t value_index; + volatile size_t type_index; + volatile size_t length_index; + volatile size_t value_index; }; TEST_F(DhcpcdGetOptionTest, OptionNotPresent) { -- cgit v1.2.3