diff --git a/audio/aidl/default/Stream.cpp b/audio/aidl/default/Stream.cpp index e8c1693a2f..a805b872cd 100644 --- a/audio/aidl/default/Stream.cpp +++ b/audio/aidl/default/Stream.cpp @@ -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; diff --git a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp index aad07de6d7..fe749f6c1f 100644 --- a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp +++ b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp @@ -102,7 +102,7 @@ std::optional 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: