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

Commit db711032 authored by S Vasudev Prasad's avatar S Vasudev Prasad
Browse files

Removed unused variable macro usage

Note: On host toolchains, __unused doesnt seem to be present. Hence
updated all instances to use __attribute__((unused)) instead. Also
unused variables have been deprecated and code has been updated
to use br.skipBits() instead.

Test: Build libstagefright_foundation on Android
Bug: 151789258

Change-Id: Ia2af1467803f3325aa838c8d57809790d5ce19a0
parent 98f98495
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -546,11 +546,9 @@ bool ExtractDimensionsFromVOLHeader(
    CHECK_NE(video_object_type_indication,
             0x21u /* Fine Granularity Scalable */);

    unsigned video_object_layer_verid __unused;
    unsigned video_object_layer_priority __unused;
    if (br.getBits(1)) {
        video_object_layer_verid = br.getBits(4);
        video_object_layer_priority = br.getBits(3);
        br.skipBits(4); //video_object_layer_verid
        br.skipBits(3); //video_object_layer_priority
    }
    unsigned aspect_ratio_info = br.getBits(4);
    if (aspect_ratio_info == 0x0f /* extended PAR */) {
@@ -609,7 +607,7 @@ bool ExtractDimensionsFromVOLHeader(
    unsigned video_object_layer_height = br.getBits(13);
    CHECK(br.getBits(1));  // marker_bit

    unsigned interlaced __unused = br.getBits(1);
    br.skipBits(1); // interlaced

    *width = video_object_layer_width;
    *height = video_object_layer_height;
@@ -655,7 +653,7 @@ bool GetMPEGAudioFrameSize(
        return false;
    }

    unsigned protection __unused = (header >> 16) & 1;
    // we can get protection value from (header >> 16) & 1

    unsigned bitrate_index = (header >> 12) & 0x0f;

+2 −1
Original line number Diff line number Diff line
@@ -148,7 +148,8 @@ struct ADebug {
    static char *GetDebugName(const char *name);

    inline static bool isExperimentEnabled(
            const char *name __unused /* nonnull */, bool allow __unused = true) {
            const char *name __attribute__((unused)) /* nonnull */,
            bool allow __attribute__((unused)) = true) {
#ifdef ENABLE_STAGEFRIGHT_EXPERIMENTS
        if (!strcmp(name, "legacy-adaptive")) {
            return getExperimentFlag(allow, name, 2, 1); // every other day