From 3c8889e827d95b195fe5ba077a01cb5b6042e534 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Thu, 29 Mar 2012 11:38:59 +0200 Subject: libmedia: Fix build with gcc 4.7 gcc 4.7 doesn't like the redefinition of n in the same scope: for(size_t n=...;;) { size_t n = 2; // <-- duplicate definition } Change-Id: Idfc2e768a0eb85a3dacccd3431b4ad44775432a4 Signed-off-by: Bernhard Rosenkraenzer --- media/libmedia/MediaProfiles.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'media/libmedia/MediaProfiles.cpp') diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp index 6929efa..84bc7a7 100644 --- a/media/libmedia/MediaProfiles.cpp +++ b/media/libmedia/MediaProfiles.cpp @@ -516,16 +516,16 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() { // Check high and low from either camcorder profile or timelapse profile // but not both. Default, check camcorder profile size_t j = 0; - size_t n = 2; + size_t o = 2; if (isTimelapseProfile(quality)) { // Check timelapse profile instead. j = 2; - n = kNumRequiredProfiles; + o = kNumRequiredProfiles; } else { // Must be camcorder profile. CHECK(isCamcorderProfile(quality)); } - for (; j < n; ++j) { + for (; j < o; ++j) { info = &(mRequiredProfileRefs[refIndex].mRefs[j]); if ((j % 2 == 0 && product > info->mResolutionProduct) || // low (j % 2 != 0 && product < info->mResolutionProduct)) { // high -- cgit v1.1