From 028ab996e50a3a6a5c6dde88f9b2cc5d2f354654 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Wed, 22 Jun 2011 16:18:04 -0700 Subject: Fix warnings for uninitialized local variables Change-Id: Ic9b03b0fd215444e76c7b7bebb385f7831c557e0 --- media/libmedia/AudioRecord.cpp | 2 +- media/libmedia/AudioTrack.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'media') diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index a41d7ab..e808143 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -481,7 +481,7 @@ status_t AudioRecord::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) { AutoMutex lock(mLock); int active; - status_t result; + status_t result = NO_ERROR; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; uint32_t waitTimeMs = (waitCount < 0) ? cblk->bufferTimeoutMs : WAIT_PERIOD_MS; diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 37fe182..ae81863 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -314,7 +314,7 @@ sp& AudioTrack::sharedBuffer() void AudioTrack::start() { sp t = mAudioTrackThread; - status_t status; + status_t status = NO_ERROR; LOGV("start %p", this); if (t != 0) { @@ -825,7 +825,7 @@ status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount) { AutoMutex lock(mLock); int active; - status_t result; + status_t result = NO_ERROR; audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = audioBuffer->frameCount; uint32_t waitTimeMs = (waitCount < 0) ? cblk->bufferTimeoutMs : WAIT_PERIOD_MS; -- cgit v1.1