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

Commit 3038f743 authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix cert-dcl16-c clang-tidy warnings."

am: 20b64c4b

Change-Id: I5b50ddada4c24ca6146baad0bbe023e209f469fe
parents 5c8e7355 20b64c4b
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -84,9 +84,9 @@ TEST_F(KernelWakesParserTest, Normal) {
    record1->set_event_count(8);
    record1->set_event_count(8);
    record1->set_wakeup_count(0);
    record1->set_wakeup_count(0);
    record1->set_expire_count(0);
    record1->set_expire_count(0);
    record1->set_active_since(0l);
    record1->set_active_since(0L);
    record1->set_total_time(0l);
    record1->set_total_time(0L);
    record1->set_max_time(0l);
    record1->set_max_time(0L);
    record1->set_last_change(131348LL);
    record1->set_last_change(131348LL);
    record1->set_prevent_suspend_time(0LL);
    record1->set_prevent_suspend_time(0LL);


@@ -96,9 +96,9 @@ TEST_F(KernelWakesParserTest, Normal) {
    record2->set_event_count(143);
    record2->set_event_count(143);
    record2->set_wakeup_count(0);
    record2->set_wakeup_count(0);
    record2->set_expire_count(0);
    record2->set_expire_count(0);
    record2->set_active_since(0l);
    record2->set_active_since(0L);
    record2->set_total_time(123l);
    record2->set_total_time(123L);
    record2->set_max_time(3l);
    record2->set_max_time(3L);
    record2->set_last_change(2067286206LL);
    record2->set_last_change(2067286206LL);
    record2->set_prevent_suspend_time(0LL);
    record2->set_prevent_suspend_time(0LL);


+7 −7
Original line number Original line Diff line number Diff line
@@ -34,11 +34,11 @@ inline uint32_t packLocale(const char* language, const char* region) {
}
}


inline uint32_t dropRegion(uint32_t packed_locale) {
inline uint32_t dropRegion(uint32_t packed_locale) {
    return packed_locale & 0xFFFF0000lu;
    return packed_locale & 0xFFFF0000LU;
}
}


inline bool hasRegion(uint32_t packed_locale) {
inline bool hasRegion(uint32_t packed_locale) {
    return (packed_locale & 0x0000FFFFlu) != 0;
    return (packed_locale & 0x0000FFFFLU) != 0;
}
}


const size_t SCRIPT_LENGTH = 4;
const size_t SCRIPT_LENGTH = 4;
@@ -122,9 +122,9 @@ inline bool isRepresentative(uint32_t language_and_region, const char* script) {
    return (REPRESENTATIVE_LOCALES.count(packed_locale) != 0);
    return (REPRESENTATIVE_LOCALES.count(packed_locale) != 0);
}
}


const uint32_t US_SPANISH = 0x65735553lu; // es-US
const uint32_t US_SPANISH = 0x65735553LU; // es-US
const uint32_t MEXICAN_SPANISH = 0x65734D58lu; // es-MX
const uint32_t MEXICAN_SPANISH = 0x65734D58LU; // es-MX
const uint32_t LATIN_AMERICAN_SPANISH = 0x6573A424lu; // es-419
const uint32_t LATIN_AMERICAN_SPANISH = 0x6573A424LU; // es-419


// The two locales es-US and es-MX are treated as special fallbacks for es-419.
// The two locales es-US and es-MX are treated as special fallbacks for es-419.
// If there is no es-419, they are considered its equivalent.
// If there is no es-419, they are considered its equivalent.
@@ -225,8 +225,8 @@ void localeDataComputeScript(char out[4], const char* language, const char* regi
}
}


const uint32_t ENGLISH_STOP_LIST[2] = {
const uint32_t ENGLISH_STOP_LIST[2] = {
    0x656E0000lu, // en
    0x656E0000LU, // en
    0x656E8400lu, // en-001
    0x656E8400LU, // en-001
};
};
const char ENGLISH_CHARS[2] = {'e', 'n'};
const char ENGLISH_CHARS[2] = {'e', 'n'};
const char LATIN_CHARS[4] = {'L', 'a', 't', 'n'};
const char LATIN_CHARS[4] = {'L', 'a', 't', 'n'};
+727 −727

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8
Original line number Original line Diff line number Diff line
@@ -494,17 +494,17 @@ static jlong android_media_MediaExtractor_getSampleTime(


    if (extractor == NULL) {
    if (extractor == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        return -1ll;
        return -1LL;
    }
    }


    int64_t sampleTimeUs;
    int64_t sampleTimeUs;
    status_t err = extractor->getSampleTime(&sampleTimeUs);
    status_t err = extractor->getSampleTime(&sampleTimeUs);


    if (err == ERROR_END_OF_STREAM) {
    if (err == ERROR_END_OF_STREAM) {
        return -1ll;
        return -1LL;
    } else if (err != OK) {
    } else if (err != OK) {
        jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
        jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
        return -1ll;
        return -1LL;
    }
    }


    return (jlong) sampleTimeUs;
    return (jlong) sampleTimeUs;
@@ -516,17 +516,17 @@ static jlong android_media_MediaExtractor_getSampleSize(


    if (extractor == NULL) {
    if (extractor == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        return -1ll;
        return -1LL;
    }
    }


    size_t sampleSize;
    size_t sampleSize;
    status_t err = extractor->getSampleSize(&sampleSize);
    status_t err = extractor->getSampleSize(&sampleSize);


    if (err == ERROR_END_OF_STREAM) {
    if (err == ERROR_END_OF_STREAM) {
        return -1ll;
        return -1LL;
    } else if (err != OK) {
    } else if (err != OK) {
        jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
        jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
        return -1ll;
        return -1LL;
    }
    }


    return (jlong) sampleSize;
    return (jlong) sampleSize;
@@ -828,13 +828,13 @@ static jlong android_media_MediaExtractor_getCachedDurationUs(


    if (extractor == NULL) {
    if (extractor == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        jniThrowException(env, "java/lang/IllegalStateException", NULL);
        return -1ll;
        return -1LL;
    }
    }


    int64_t cachedDurationUs;
    int64_t cachedDurationUs;
    bool eos;
    bool eos;
    if (!extractor->getCachedDuration(&cachedDurationUs, &eos)) {
    if (!extractor->getCachedDuration(&cachedDurationUs, &eos)) {
        return -1ll;
        return -1LL;
    }
    }


    return (jlong) cachedDurationUs;
    return (jlong) cachedDurationUs;
+2 −2
Original line number Original line Diff line number Diff line
@@ -230,7 +230,7 @@ TEST_F(ConfigurationParserTest, ValidateFile) {
                                      test::ParseConfigOrDie("fr"), test::ParseConfigOrDie("de")));
                                      test::ParseConfigOrDie("fr"), test::ParseConfigOrDie("de")));
  ASSERT_TRUE(a1.android_sdk);
  ASSERT_TRUE(a1.android_sdk);
  ASSERT_TRUE(a1.android_sdk.value().min_sdk_version);
  ASSERT_TRUE(a1.android_sdk.value().min_sdk_version);
  EXPECT_EQ(a1.android_sdk.value().min_sdk_version, 19l);
  EXPECT_EQ(a1.android_sdk.value().min_sdk_version, 19L);
  EXPECT_THAT(a1.textures, SizeIs(1ul));
  EXPECT_THAT(a1.textures, SizeIs(1ul));
  EXPECT_THAT(a1.features, SizeIs(1ul));
  EXPECT_THAT(a1.features, SizeIs(1ul));


@@ -250,7 +250,7 @@ TEST_F(ConfigurationParserTest, ValidateFile) {
                          test::ParseConfigOrDie("fr-rCA")));
                          test::ParseConfigOrDie("fr-rCA")));
  ASSERT_TRUE(a2.android_sdk);
  ASSERT_TRUE(a2.android_sdk);
  ASSERT_TRUE(a2.android_sdk.value().min_sdk_version);
  ASSERT_TRUE(a2.android_sdk.value().min_sdk_version);
  EXPECT_EQ(a2.android_sdk.value().min_sdk_version, 19l);
  EXPECT_EQ(a2.android_sdk.value().min_sdk_version, 19L);
  EXPECT_THAT(a2.textures, SizeIs(1ul));
  EXPECT_THAT(a2.textures, SizeIs(1ul));
  EXPECT_THAT(a2.features, SizeIs(1ul));
  EXPECT_THAT(a2.features, SizeIs(1ul));
}
}
Loading