Remove set but not used variable

Bug: 19245503

Change-Id: I57002952eadf4d5b7636e78fc0846c915cceb5dd
diff --git a/dhcp.c b/dhcp.c
index 4ff562c..5e9cf9b 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1306,7 +1306,6 @@
 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 @@
 			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 @@
   }
 
   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) {