Fix -Wunused-variable compiler warning

Test: presubmit
Change-Id: I146d3435fe76da7f300452a14b62ce430c38ae36
This commit is contained in:
Yi Kong 2023-12-06 14:03:58 +09:00
parent 577cc0ac9b
commit 810d41a774
2 changed files with 2 additions and 2 deletions

View file

@ -582,7 +582,7 @@ bool StreamOutWorkerLogic::write(size_t clientSize, StreamDescriptor::Reply* rep
const size_t frameSize = mContext->getFrameSize();
bool fatal = false;
int32_t latency = mContext->getNominalLatencyMs();
if (bool success = readByteCount > 0 ? dataMQ->read(&mDataBuffer[0], readByteCount) : true) {
if (readByteCount > 0 ? dataMQ->read(&mDataBuffer[0], readByteCount) : true) {
const bool isConnected = mIsConnected;
LOG(VERBOSE) << __func__ << ": reading of " << readByteCount << " bytes from data MQ"
<< " succeeded; connected? " << isConnected;

View file

@ -102,7 +102,7 @@ std::optional<bool> isUp(std::string ifname) {
static bool hasIpv4(std::string ifname) {
auto ifr = ifreqs::fromName(ifname);
switch (const auto status = ifreqs::trySend(SIOCGIFADDR, ifr)) {
switch (ifreqs::trySend(SIOCGIFADDR, ifr)) {
case 0:
return true;
case EADDRNOTAVAIL: