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

Commit d66be0ae authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Use -Werror in frameworks/native/libs/gui and ui

* Remove unused variable and function.
* Suppress warning of unused return results.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: If6f445be1e7677a37bf780844a79b84d6d7e1c1e
parent afee092b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ public:
            int inside = spanner.next(current.top, current.bottom);
            spannerInner.prepare(inside);
            do {
                TYPE left, right;
                int inner_inside = spannerInner.next(current.left, current.right);
                if ((op_mask >> inner_inside) & 1) {
                    if (current.left < current.right && 
+4 −1
Original line number Diff line number Diff line
@@ -25,9 +25,12 @@ cc_library_shared {
    },

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],
    cppflags: [
        "-Weverything",
        "-Werror",

        // The static constructors and destructors in this library have not been noted to
        // introduce significant overheads
+4 −1
Original line number Diff line number Diff line
@@ -153,7 +153,10 @@ status_t Surface::getDisplayRefreshCycleDuration(nsecs_t* outRefreshDuration) {
    ATRACE_CALL();

    DisplayStatInfo stats;
    status_t err = composerService()->getDisplayStats(NULL, &stats);
    status_t result = composerService()->getDisplayStats(NULL, &stats);
    if (result != NO_ERROR) {
        return result;
    }

    *outRefreshDuration = stats.vsyncPeriod;

+4 −0
Original line number Diff line number Diff line
@@ -7,6 +7,10 @@ cc_test {
    test_suites: ["device-tests"],

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],

    srcs: [
        "BufferItemConsumer_test.cpp",
+0 −6
Original line number Diff line number Diff line
@@ -310,8 +310,6 @@ void checkGreyscaleBuffer(const CpuConsumer::LockedBuffer &buf) {
    uint32_t h = buf.height;
    const int blockWidth = w > 16 ? w / 16 : 1;
    const int blockHeight = h > 16 ? h / 16 : 1;
    const int blockRows = h / blockHeight;
    const int blockCols = w / blockWidth;

    // Top-left square is bright
    checkPixel(buf, 0, 0, 191);
@@ -349,8 +347,6 @@ void checkRgba8888Buffer(const CpuConsumer::LockedBuffer &buf) {
    uint32_t h = buf.height;
    const int blockWidth = w > 16 ? w / 16 : 1;
    const int blockHeight = h > 16 ? h / 16 : 1;
    const int blockRows = h / blockHeight;
    const int blockCols = w / blockWidth;

    // Top-left square is bright red
    checkPixel(buf, 0, 0, 191, 63, 63);
@@ -392,8 +388,6 @@ void checkBayerRawBuffer(const CpuConsumer::LockedBuffer &buf) {
    uint32_t h = buf.height;
    const int blockWidth = (w > 16 ? w / 8 : 2) & ~0x1;
    const int blockHeight = (h > 16 ? h / 8 : 2) & ~0x1;
    const int blockRows = h / blockHeight;
    const int blockCols = w / blockWidth;

    // Top-left square is red
    checkPixel(buf, 0, 0, 1000, 200, 200);
Loading