Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67923215 authored by Stephen Hines's avatar Stephen Hines
Browse files

NFC: Clean up code to fix misdiagnosed unitialized variables (r2, g2, b2).

Bug: http://b/131390872
Test: Builds with -Wconditional-uninitialized.
Change-Id: I65dcc0e25e985454dbb7e53532eacfe6b36915cd
parent 7aaa2548
Loading
Loading
Loading
Loading
+24 −28
Original line number Diff line number Diff line
@@ -378,7 +378,6 @@ static void etc_encodeBaseColors(etc1_byte* pBaseColors,
        const etc1_byte* pColors, etc_compressed* pCompressed) {
    int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
    bool differential;
    {
    int r51 = convert8To5(pColors[0]);
    int g51 = convert8To5(pColors[1]);
    int b51 = convert8To5(pColors[2]);
@@ -402,10 +401,7 @@ static void etc_encodeBaseColors(etc1_byte* pBaseColors,
        b2 = convert5To8(b51 + db);
        pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19)
                | ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2;
        }
    }

    if (!differential) {
    } else {
        int r41 = convert8To4(pColors[0]);
        int g41 = convert8To4(pColors[1]);
        int b41 = convert8To4(pColors[2]);