Fix build warnings
Change-Id: I33178dbe0bfc087d6599579ca0529ad853c669ed
diff --git a/services/audioflinger/FastCapture.cpp b/services/audioflinger/FastCapture.cpp
index bb83858..d202169 100644
--- a/services/audioflinger/FastCapture.cpp
+++ b/services/audioflinger/FastCapture.cpp
@@ -104,8 +104,10 @@
} else {
mFormat = mInputSource->format();
mSampleRate = Format_sampleRate(mFormat);
+#if !LOG_NDEBUG
unsigned channelCount = Format_channelCount(mFormat);
ALOG_ASSERT(channelCount >= 1 && channelCount <= FCC_8);
+#endif
}
dumpState->mSampleRate = mSampleRate;
eitherChanged = true;
@@ -186,7 +188,6 @@
ALOG_ASSERT(mPipeSink != NULL);
ALOG_ASSERT(mReadBuffer != NULL);
if (mReadBufferState < 0) {
- unsigned channelCount = Format_channelCount(mFormat);
memset(mReadBuffer, 0, frameCount * Format_frameSize(mFormat));
mReadBufferState = frameCount;
}