aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2015-02-18 11:38:04 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-18 11:38:04 +0000
commit41ffcba464dbbf22a3f0d7459c07ad9c9bffbf0c (patch)
treecaad8af28d8a010f738bb5fe6c06b3a068d962b1
parentb0539d2a4fc85308948da12dbf104b58faeacb75 (diff)
parent64836ad4736f0f4eb2cac44ad640b2e12053567f (diff)
downloadandroid_external_dhcpcd-41ffcba464dbbf22a3f0d7459c07ad9c9bffbf0c.tar.gz
android_external_dhcpcd-41ffcba464dbbf22a3f0d7459c07ad9c9bffbf0c.tar.bz2
android_external_dhcpcd-41ffcba464dbbf22a3f0d7459c07ad9c9bffbf0c.zip
am 64836ad4: am c856def8: am 0b93c1c5: am 1990a910: am 23f28ff2: am 3b32f45a: am df8360e1: am 8c596b79: am d8db5112: Remove set but not used variable
* commit '64836ad4736f0f4eb2cac44ad640b2e12053567f': Remove set but not used variable
-rw-r--r--dhcp.c2
-rw-r--r--dhcpcd_test.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/dhcp.c b/dhcp.c
index 0a1d220..bdd984f 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1382,7 +1382,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;
@@ -1425,7 +1424,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) {