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

Commit 84e3abe2 authored by Henri Chataing's avatar Henri Chataing
Browse files

system/stack/Android.bp: Enforce -Wunused-parameter

Bug: 299772495
Test: m com.android.btservices
Flag: EXEMPT, mechanical refactor
Change-Id: I104fb6a6b0695cd9ccd71a60e4ef60902af64b20
parent 87eff145
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -364,9 +364,6 @@ cc_defaults {
        "bluetooth_cflags",
        "bluetooth_flatbuffer_bundler_defaults",
    ],
    cflags: [
        "-Wno-unused-parameter",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
@@ -957,7 +954,6 @@ cc_test {
        cfi: false,
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

// Bluetooth stack smp unit tests for target
@@ -1041,8 +1037,6 @@ cc_test {
            ],
        },
    },
    //    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

// Bluetooth stack advertise data parsing unit tests for target
@@ -1115,7 +1109,6 @@ cc_test {
        cfi: false,
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1183,7 +1176,6 @@ cc_test {
        misc_undefined: ["bounds"],
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1254,7 +1246,6 @@ cc_test {
        misc_undefined: ["bounds"],
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1265,7 +1256,6 @@ cc_test {
    ],
    cflags: [
        "-DUNIT_TESTS",
        "-Wno-unused-parameter",
    ],
    test_suites: ["general-tests"],
    host_supported: true,
@@ -1407,7 +1397,6 @@ cc_test {
        misc_undefined: ["bounds"],
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

// gatt sr hash test
@@ -1474,7 +1463,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

// Iso manager unit tests
@@ -1614,7 +1602,6 @@ cc_test {
        cfi: false,
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1870,7 +1857,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1943,7 +1929,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -2044,7 +2029,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -2139,7 +2123,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -2229,7 +2212,6 @@ cc_test {
        },
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wunused-parameter"

using bluetooth::Uuid;
using namespace bluetooth;
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wunused-parameter"

using bluetooth::Uuid;

+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@

// TODO(b/369381361) Enfore -Wmissing-prototypes
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wunused-parameter"

using bluetooth::Uuid;
bt_status_t do_in_main_thread(base::OnceCallback<void()>) {
+5 −5
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ bluetooth::common::PostableContext* get_main() { return nullptr; }

namespace bluetooth {
namespace os {
uint32_t GetSystemPropertyUint32Base(const std::string& property, uint32_t default_value,
                                     int base) {
uint32_t GetSystemPropertyUint32Base(const std::string& /*property*/, uint32_t default_value,
                                     int /*base*/) {
  return default_value;
}
}  // namespace os
@@ -100,15 +100,15 @@ namespace {
class FakeBtStack {
public:
  FakeBtStack() {
    test::mock::stack_acl::acl_create_le_connection.body = [](const RawAddress& bd_addr) {
    test::mock::stack_acl::acl_create_le_connection.body = [](const RawAddress& /*bd_addr*/) {
      return true;
    };
    test::mock::stack_acl::acl_send_data_packet_br_edr.body = [](const RawAddress& bd_addr,
    test::mock::stack_acl::acl_send_data_packet_br_edr.body = [](const RawAddress& /*bd_addr*/,
                                                                 BT_HDR* hdr) {
      ConsumeData((const uint8_t*)hdr, hdr->offset + hdr->len);
      osi_free(hdr);
    };
    test::mock::stack_acl::acl_send_data_packet_ble.body = [](const RawAddress& bd_addr,
    test::mock::stack_acl::acl_send_data_packet_ble.body = [](const RawAddress& /*bd_addr*/,
                                                              BT_HDR* hdr) {
      ConsumeData((const uint8_t*)hdr, hdr->offset + hdr->len);
      osi_free(hdr);
Loading