Skip to content

Commit 0bd12c1

Browse files
Bernhard RosenkraenzerBernhard Rosenkraenzer
authored andcommitted
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 <Bernhard.Rosenkranzer@linaro.org>
1 parent 8ea93aa commit 0bd12c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

media/libmedia/MediaProfiles.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,16 @@ void MediaProfiles::checkAndAddRequiredProfilesIfNecessary() {
514514
// Check high and low from either camcorder profile or timelapse profile
515515
// but not both. Default, check camcorder profile
516516
size_t j = 0;
517-
size_t n = 2;
517+
size_t o = 2;
518518
if (isTimelapseProfile(quality)) {
519519
// Check timelapse profile instead.
520520
j = 2;
521-
n = kNumRequiredProfiles;
521+
o = kNumRequiredProfiles;
522522
} else {
523523
// Must be camcorder profile.
524524
CHECK(isCamcorderProfile(quality));
525525
}
526-
for (; j < n; ++j) {
526+
for (; j < o; ++j) {
527527
info = &(mRequiredProfileRefs[refIndex].mRefs[j]);
528528
if ((j % 2 == 0 && product > info->mResolutionProduct) || // low
529529
(j % 2 != 0 && product < info->mResolutionProduct)) { // high

0 commit comments

Comments
 (0)