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

Commit 7386e96f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Suppress clang-analyzer-security.FloatLoopCounter warnings" am:...

Merge "Suppress clang-analyzer-security.FloatLoopCounter warnings" am: acb9bdad am: e4209cda am: 73df1b85

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2385214



Change-Id: I49b385887d57fe81556922f82d71e12a8690c6e9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 557b44b6 73df1b85
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ TEST_F(ColorSpaceTest, TransferFunctions) {
    EXPECT_NEAR(1.0f, sRGB.getEOTF()(1.0f), 1e-6f);
    EXPECT_NEAR(1.0f, sRGB.getOETF()(1.0f), 1e-6f);

    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter,cert-flp30-c)
    for (float v = 0.0f; v <= 0.5f; v += 1e-3f) {
        ASSERT_TRUE(v >= sRGB.getEOTF()(v));
        ASSERT_TRUE(v <= sRGB.getOETF()(v));
@@ -118,6 +119,7 @@ TEST_F(ColorSpaceTest, TransferFunctions) {

    float previousEOTF = std::numeric_limits<float>::lowest();
    float previousOETF = std::numeric_limits<float>::lowest();
    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter,cert-flp30-c)
    for (float v = 0.0f; v <= 1.0f; v += 1e-3f) {
        ASSERT_TRUE(previousEOTF < sRGB.getEOTF()(v));
        previousEOTF = sRGB.getEOTF()(v);
@@ -131,6 +133,7 @@ TEST_F(ColorSpaceTest, TransferFunctions) {
          {0.3127f, 0.3290f}
          // linear transfer functions
    );
    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter,cert-flp30-c)
    for (float v = 0.0f; v <= 1.0f; v += 1e-3f) {
        ASSERT_EQ(v, sRGB2.getEOTF()(v));
        ASSERT_EQ(v, sRGB2.getOETF()(v));