Remove "if (auto ret = " treated as unused by some compilers
It's not good form to have a variable that's created and used only once
in the same line anyway, so the compilers that flag it are probably in
the right.
Test: netd_benchmark
Bug: 29748723
Change-Id: Idfa51a8ffb11b70f18a3c4afafc59f1910f48a83
diff --git a/tests/benchmarks/connect_benchmark.cpp b/tests/benchmarks/connect_benchmark.cpp
index ec6eeec..d3e0773 100644
--- a/tests/benchmarks/connect_benchmark.cpp
+++ b/tests/benchmarks/connect_benchmark.cpp
@@ -78,7 +78,7 @@
const Stopwatch stopwatch;
sockaddr_in server = { .sin_family = AF_INET, .sin_port = htons(port) };
- if (auto ret = connect(sock, (sockaddr*) &server, sizeof(server))) {
+ if (connect(sock, (sockaddr*) &server, sizeof(server))) {
state.SkipWithError(StringPrintf("connect() failed with errno=%d", errno).c_str());
close(sock);
break;
@@ -135,7 +135,7 @@
const Stopwatch stopwatch;
sockaddr_in6 server = { .sin6_family = AF_INET6, .sin6_port = htons(port) };
- if (auto ret = connect(sock, (sockaddr*) &server, sizeof(server))) {
+ if (connect(sock, (sockaddr*) &server, sizeof(server))) {
state.SkipWithError(StringPrintf("connect() failed with errno=%d", errno).c_str());
close(sock);
break;