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

Commit 65c954e7 authored by Caroline Tice's avatar Caroline Tice Committed by George Burgess IV
Browse files

Fix static analyzer warnings

It was unhappy about uninitialized values potentially being passed into
calls. The warnings were:

frameworks/av/media/libstagefright/DataSource.cpp:254:22: warning:
Function call argument is an uninitialized value

frameworks/av/media/libstagefright/MPEG4Extractor.cpp:4528:17: warning:
Function call argument is an uninitialized value

(The latter was complaining about both `size` and `offset`)

Bug: None
Test: Still builds; static analyzer is now less unhappy.
Change-Id: If8befe493267a5de20e46787b50d854c49d208a3
parent f41c781c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ sp<DataSource> DataSource::CreateFromURI(
        }

        String8 cacheConfig;
        bool disconnectAtHighwatermark;
        bool disconnectAtHighwatermark = false;
        KeyedVector<String8, String8> nonCacheSpecificHeaders;
        if (headers != NULL) {
            nonCacheSpecificHeaders = *headers;
+2 −2
Original line number Diff line number Diff line
@@ -4412,8 +4412,8 @@ status_t MPEG4Source::read(
        // fall through
    }

    off64_t offset;
    size_t size;
    off64_t offset = 0;
    size_t size = 0;
    uint32_t cts, stts;
    bool isSyncSample;
    bool newBuffer = false;