diff options
author | 2024-09-21 01:20:25 +0000 | |
---|---|---|
committer | 2024-09-25 21:54:51 +0000 | |
commit | 22f5e11b2ef10ec011d7c290ddda8f9550abe648 (patch) | |
tree | 89f134b4e26342a78e34863e758c29d762611fd3 | |
parent | d26f24190c8fb332eae8d6e65183576a391b06c6 (diff) |
Enforce -Wmissing-prototypes
This lint check will raise an error if a function is implemented
without a corresponding prototype declaration included in scope.
The main use case will be to ensure mock functions do not become out of
sync causing the original function to be linked instead.
Because of the large amount of errors, this change suppresses
errors in all locations, to be cleaned up gradually.
Bug: 369381361
Test: m com.android.btservices
Flag: EXEMPT, lint fixes
Change-Id: I888b5e284e237d8a6e2864bdde55c0a7fc0c348d
347 files changed, 1063 insertions, 20 deletions
diff --git a/Android.bp b/Android.bp index e88d6ab550..9fbf29d0df 100644 --- a/Android.bp +++ b/Android.bp @@ -66,6 +66,7 @@ cc_defaults { "-Wall", "-Werror", "-Wextra", + "-Wmissing-prototypes", // Override global.go that demote the error to a warning "-Werror=format", "-Werror=reorder-init-list", diff --git a/android/app/Android.bp b/android/app/Android.bp index cd9465e6c7..b80bd4057c 100644 --- a/android/app/Android.bp +++ b/android/app/Android.bp @@ -199,11 +199,8 @@ cc_library { "libbluetooth-types", ], cflags: [ - /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/ - "-Wall", - "-Werror", - "-Wextra", - "-Wno-unused-parameter", + // we export all classes, so change default visibility, + // instead of having EXPORT_SYMBOL on each class "-fvisibility=default", ], sanitize: { diff --git a/android/app/jni/com_android_bluetooth_avrcp_target.cpp b/android/app/jni/com_android_bluetooth_avrcp_target.cpp index d717ad0d8d..22f11e4345 100644 --- a/android/app/jni/com_android_bluetooth_avrcp_target.cpp +++ b/android/app/jni/com_android_bluetooth_avrcp_target.cpp @@ -27,6 +27,9 @@ #include "./com_android_bluetooth.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::avrcp::Attribute; using bluetooth::avrcp::AttributeEntry; using bluetooth::avrcp::FolderInfo; diff --git a/android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp b/android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp index 0d69e44939..e9d2ebe862 100644 --- a/android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +++ b/android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp @@ -33,6 +33,9 @@ #include "hardware/bt_sock.h" #include "types/bt_transport.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; extern bt_interface_t bluetoothInterface; diff --git a/android/app/jni/com_android_bluetooth_gatt.cpp b/android/app/jni/com_android_bluetooth_gatt.cpp index 9c27527fa5..e164923de8 100644 --- a/android/app/jni/com_android_bluetooth_gatt.cpp +++ b/android/app/jni/com_android_bluetooth_gatt.cpp @@ -33,6 +33,9 @@ #include "rust/src/gatt/ffi/gatt_shim.h" #include "src/gatt/ffi.rs.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; #define UUID_PARAMS(uuid) uuid_lsb(uuid), uuid_msb(uuid) diff --git a/android/app/jni/com_android_bluetooth_le_audio.cpp b/android/app/jni/com_android_bluetooth_le_audio.cpp index 343beaf9c1..69c25d99b3 100644 --- a/android/app/jni/com_android_bluetooth_le_audio.cpp +++ b/android/app/jni/com_android_bluetooth_le_audio.cpp @@ -25,6 +25,9 @@ #include "com_android_bluetooth.h" #include "hardware/bt_le_audio.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::le_audio::BroadcastId; using bluetooth::le_audio::BroadcastState; using bluetooth::le_audio::btle_audio_bits_per_sample_index_t; diff --git a/system/audio/asrc/asrc_resampler_test.cc b/system/audio/asrc/asrc_resampler_test.cc index f631a16ac6..19ea04df0f 100644 --- a/system/audio/asrc/asrc_resampler_test.cc +++ b/system/audio/asrc/asrc_resampler_test.cc @@ -19,6 +19,9 @@ #include <cstdio> #include <iostream> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bluetooth::common::MessageLoopThread message_loop_thread("main message loop"); bluetooth::common::MessageLoopThread* get_main_thread() { return &message_loop_thread; } diff --git a/system/audio_hal_interface/Android.bp b/system/audio_hal_interface/Android.bp index db1ee44d42..9704c1589b 100644 --- a/system/audio_hal_interface/Android.bp +++ b/system/audio_hal_interface/Android.bp @@ -206,6 +206,7 @@ cc_defaults { ], defaults: [ "aconfig_lib_cc_shared_link.defaults", + "bluetooth_cflags", "latest_android_hardware_audio_common_ndk_static", "latest_android_hardware_bluetooth_audio_ndk_static", "latest_android_media_audio_common_types_ndk_static", diff --git a/system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc b/system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc index 67082b85de..c6f9091ac0 100644 --- a/system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc +++ b/system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc @@ -31,6 +31,9 @@ #include "provider_info.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace audio { namespace aidl { diff --git a/system/audio_hal_interface/aidl/le_audio_software_aidl.cc b/system/audio_hal_interface/aidl/le_audio_software_aidl.cc index fc685a56a9..304f290898 100644 --- a/system/audio_hal_interface/aidl/le_audio_software_aidl.cc +++ b/system/audio_hal_interface/aidl/le_audio_software_aidl.cc @@ -31,6 +31,9 @@ #include "hal_version_manager.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace audio { namespace aidl { diff --git a/system/audio_hal_interface/aidl/le_audio_utils.cc b/system/audio_hal_interface/aidl/le_audio_utils.cc index dc9fbd5638..cd1b2964a7 100644 --- a/system/audio_hal_interface/aidl/le_audio_utils.cc +++ b/system/audio_hal_interface/aidl/le_audio_utils.cc @@ -22,6 +22,9 @@ #include "hardware/bt_le_audio.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace audio { namespace aidl { diff --git a/system/audio_hal_interface/aidl/provider_info.cc b/system/audio_hal_interface/aidl/provider_info.cc index 60f6869b8b..c93e545b09 100644 --- a/system/audio_hal_interface/aidl/provider_info.cc +++ b/system/audio_hal_interface/aidl/provider_info.cc @@ -25,6 +25,9 @@ #include "client_interface_aidl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::audio::aidl { using ::aidl::android::hardware::bluetooth::audio::CodecId; using ::aidl::android::hardware::bluetooth::audio::CodecInfo; diff --git a/system/audio_hal_interface/hal_version_manager.cc b/system/audio_hal_interface/hal_version_manager.cc index 19c48c58da..a085d21ce1 100644 --- a/system/audio_hal_interface/hal_version_manager.cc +++ b/system/audio_hal_interface/hal_version_manager.cc @@ -26,6 +26,9 @@ #include "aidl/audio_aidl_interfaces.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace audio { diff --git a/system/audio_hal_interface/hfp_client_interface.cc b/system/audio_hal_interface/hfp_client_interface.cc index 51c80efab8..9a41e462c2 100644 --- a/system/audio_hal_interface/hfp_client_interface.cc +++ b/system/audio_hal_interface/hfp_client_interface.cc @@ -27,6 +27,9 @@ #include "os/log.h" #include "osi/include/properties.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::bluetooth::audio::aidl::hfp::HfpDecodingTransport; using ::bluetooth::audio::aidl::hfp::HfpEncodingTransport; using AudioConfiguration = ::aidl::android::hardware::bluetooth::audio::AudioConfiguration; diff --git a/system/audio_hal_interface/hfp_client_interface_unittest.cc b/system/audio_hal_interface/hfp_client_interface_unittest.cc index fa1d87a1a5..6ea503161d 100644 --- a/system/audio_hal_interface/hfp_client_interface_unittest.cc +++ b/system/audio_hal_interface/hfp_client_interface_unittest.cc @@ -26,6 +26,10 @@ #include "aidl/transport_instance.h" #include "audio_hal_interface/hal_version_manager.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wunused-private-field" + using testing::Test; using bluetooth::audio::hfp::HfpClientInterface; diff --git a/system/audio_hal_interface/hidl/client_interface_hidl_unittest.cc b/system/audio_hal_interface/hidl/client_interface_hidl_unittest.cc index e29f543b59..295ca5f2a6 100644 --- a/system/audio_hal_interface/hidl/client_interface_hidl_unittest.cc +++ b/system/audio_hal_interface/hidl/client_interface_hidl_unittest.cc @@ -24,6 +24,9 @@ #include "codec_status_hidl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { using ::android::hardware::bluetooth::audio::V2_0::AacObjectType; diff --git a/system/audio_hal_interface/le_audio_software.cc b/system/audio_hal_interface/le_audio_software.cc index 87d8083759..bc16ae1352 100644 --- a/system/audio_hal_interface/le_audio_software.cc +++ b/system/audio_hal_interface/le_audio_software.cc @@ -34,6 +34,9 @@ #include "os/log.h" #include "osi/include/properties.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace audio { diff --git a/system/audio_hal_interface/le_audio_software_host.cc b/system/audio_hal_interface/le_audio_software_host.cc index 8907da08d1..268e384157 100644 --- a/system/audio_hal_interface/le_audio_software_host.cc +++ b/system/audio_hal_interface/le_audio_software_host.cc @@ -33,6 +33,9 @@ // TODO(b/198260375): Make LEA data owner group configurable. #define LEA_HOST_DATA_GROUP "bluetooth-audio" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/audio_hal_interface/le_audio_software_unittest.cc b/system/audio_hal_interface/le_audio_software_unittest.cc index 02ba88f2ed..dec62e6a5c 100644 --- a/system/audio_hal_interface/le_audio_software_unittest.cc +++ b/system/audio_hal_interface/le_audio_software_unittest.cc @@ -31,6 +31,10 @@ #include "gmock/gmock.h" #include "hidl/le_audio_software_hidl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" +#pragma GCC diagnostic ignored "-Wunused-private-field" + using testing::Return; using testing::Test; diff --git a/system/audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc b/system/audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc index cb1eee7720..1553b05d3e 100644 --- a/system/audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc +++ b/system/audio_hearing_aid_hw/src/audio_hearing_aid_hw_utils.cc @@ -22,6 +22,9 @@ case const: \ return #const; +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + const char* audio_ha_hw_dump_ctrl_event(tHEARING_AID_CTRL_CMD event) { switch (event) { CASE_RETURN_STR(HEARING_AID_CTRL_CMD_NONE) diff --git a/system/bta/ag/bta_ag_at.cc b/system/bta/ag/bta_ag_at.cc index e5fee21d8b..36d57a70f9 100644 --- a/system/bta/ag/bta_ag_at.cc +++ b/system/bta/ag/bta_ag_at.cc @@ -37,6 +37,9 @@ #include "os/log.h" #include "osi/include/allocator.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/bta/ag/bta_ag_rfc.cc b/system/bta/ag/bta_ag_rfc.cc index 72ce906765..12ecc304c3 100644 --- a/system/bta/ag/bta_ag_rfc.cc +++ b/system/bta/ag/bta_ag_rfc.cc @@ -36,6 +36,9 @@ /* Event mask for RfCOMM port callback */ #define BTA_AG_PORT_EV_MASK PORT_EV_RXCHAR +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /* each scb has its own rfcomm callbacks */ diff --git a/system/bta/ar/bta_ar.cc b/system/bta/ar/bta_ar.cc index 86b37adb2f..6d82b2b78c 100644 --- a/system/bta/ar/bta_ar.cc +++ b/system/bta/ar/bta_ar.cc @@ -37,6 +37,9 @@ #include "stack/include/sdp_api.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth::avrcp; using namespace bluetooth; diff --git a/system/bta/av/bta_av_aact.cc b/system/bta/av/bta_av_aact.cc index b6ade3ff1d..006c01fe91 100644 --- a/system/bta/av/bta_av_aact.cc +++ b/system/bta/av/bta_av_aact.cc @@ -61,6 +61,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/bta/av/bta_av_act.cc b/system/bta/av/bta_av_act.cc index 7abd1de07a..a82211fd47 100644 --- a/system/bta/av/bta_av_act.cc +++ b/system/bta/av/bta_av_act.cc @@ -49,6 +49,9 @@ #include "stack/include/sdp_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/av/bta_av_cfg.cc b/system/bta/av/bta_av_cfg.cc index 76aee2d45e..87ecee4568 100644 --- a/system/bta/av/bta_av_cfg.cc +++ b/system/bta/av/bta_av_cfg.cc @@ -39,6 +39,9 @@ #define BTA_AV_RC_PASS_RSP_CODE AVRC_RSP_NOT_IMPL #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; const uint32_t bta_av_meta_caps_co_ids[] = {AVRC_CO_METADATA, AVRC_CO_BROADCOM}; diff --git a/system/bta/av/bta_av_ci.cc b/system/bta/av/bta_av_ci.cc index 7abaca623d..e7bddf4b1f 100644 --- a/system/bta/av/bta_av_ci.cc +++ b/system/bta/av/bta_av_ci.cc @@ -32,6 +32,9 @@ #include "osi/include/allocator.h" #include "stack/include/bt_hdr.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/bta/csis/csis_client_test.cc b/system/bta/csis/csis_client_test.cc index 56a4f8f336..fcb7467c1f 100644 --- a/system/bta/csis/csis_client_test.cc +++ b/system/bta/csis/csis_client_test.cc @@ -36,6 +36,9 @@ #include "stack/include/bt_uuid16.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool gatt_cl_read_sirk_req(const RawAddress& peer_bda, base::OnceCallback<void(tGATT_STATUS status, const RawAddress&, uint8_t sirk_type, Octet16& sirk)> diff --git a/system/bta/dm/bta_dm_act.cc b/system/bta/dm/bta_dm_act.cc index 268bd9add9..f908268bdc 100644 --- a/system/bta/dm/bta_dm_act.cc +++ b/system/bta/dm/bta_dm_act.cc @@ -66,6 +66,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/bta/dm/bta_dm_ci.cc b/system/bta/dm/bta_dm_ci.cc index 184a9de802..16f6eb50c7 100644 --- a/system/bta/dm/bta_dm_ci.cc +++ b/system/bta/dm/bta_dm_ci.cc @@ -29,6 +29,9 @@ #include "stack/include/main_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + /******************************************************************************* * * Function bta_dm_ci_rmt_oob diff --git a/system/bta/dm/bta_dm_device_search.cc b/system/bta/dm/bta_dm_device_search.cc index bc3fde0d91..a5428dc983 100644 --- a/system/bta/dm/bta_dm_device_search.cc +++ b/system/bta/dm/bta_dm_device_search.cc @@ -47,6 +47,9 @@ #include "stack/include/rnr_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/bta/dm/bta_dm_disc.cc b/system/bta/dm/bta_dm_disc.cc index ae33b0059e..441a938a31 100644 --- a/system/bta/dm/bta_dm_disc.cc +++ b/system/bta/dm/bta_dm_disc.cc @@ -52,6 +52,9 @@ #include "stack/include/srvc_api.h" #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/dm/bta_dm_disc_sdp.cc b/system/bta/dm/bta_dm_disc_sdp.cc index bd3a62492e..8bdbc9ee8a 100644 --- a/system/bta/dm/bta_dm_disc_sdp.cc +++ b/system/bta/dm/bta_dm_disc_sdp.cc @@ -44,6 +44,9 @@ #include "stack/include/srvc_api.h" #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/dm/bta_dm_gatt_client.cc b/system/bta/dm/bta_dm_gatt_client.cc index 36d53fe456..c9d7ba8e11 100644 --- a/system/bta/dm/bta_dm_gatt_client.cc +++ b/system/bta/dm/bta_dm_gatt_client.cc @@ -31,6 +31,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { TimestampedStringCircularBuffer gatt_history_{50}; constexpr char kTimeFormatString[] = "%Y-%m-%d %H:%M:%S"; diff --git a/system/bta/dm/bta_dm_pm.cc b/system/bta/dm/bta_dm_pm.cc index 141b1c78b3..dfd93ca2dc 100644 --- a/system/bta/dm/bta_dm_pm.cc +++ b/system/bta/dm/bta_dm_pm.cc @@ -47,6 +47,9 @@ #include "stack/include/main_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, const tBTA_SYS_ID id, uint8_t app_id, diff --git a/system/bta/dm/bta_dm_sec.cc b/system/bta/dm/bta_dm_sec.cc index 0e5eaf97ac..c7d2163c2a 100644 --- a/system/bta/dm/bta_dm_sec.cc +++ b/system/bta/dm/bta_dm_sec.cc @@ -37,6 +37,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static tBTM_STATUS bta_dm_sp_cback(tBTM_SP_EVT event, tBTM_SP_EVT_DATA* p_data); diff --git a/system/bta/gatt/bta_gattc_act.cc b/system/bta/gatt/bta_gattc_act.cc index 0590d97338..3064e39d97 100644 --- a/system/bta/gatt/bta_gattc_act.cc +++ b/system/bta/gatt/bta_gattc_act.cc @@ -46,6 +46,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::StringPrintf; using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/bta/gatt/bta_gattc_cache.cc b/system/bta/gatt/bta_gattc_cache.cc index 28672593c2..600cfa9edc 100644 --- a/system/bta/gatt/bta_gattc_cache.cc +++ b/system/bta/gatt/bta_gattc_cache.cc @@ -49,6 +49,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/gatt/bta_gattc_utils.cc b/system/bta/gatt/bta_gattc_utils.cc index 994411e039..11e696bc76 100644 --- a/system/bta/gatt/bta_gattc_utils.cc +++ b/system/bta/gatt/bta_gattc_utils.cc @@ -39,6 +39,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static uint8_t ble_acceptlist_size() { diff --git a/system/bta/gatt/bta_gatts_act.cc b/system/bta/gatt/bta_gatts_act.cc index 8d951ad3c2..47abf7106d 100644 --- a/system/bta/gatt/bta_gatts_act.cc +++ b/system/bta/gatt/bta_gatts_act.cc @@ -38,6 +38,9 @@ #include "stack/include/gatt_api.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static void bta_gatts_nv_save_cback(bool is_saved, tGATTS_HNDL_RANGE* p_hndl_range); diff --git a/system/bta/gatt/bta_gatts_api.cc b/system/bta/gatt/bta_gatts_api.cc index 4ceb8fe72a..5b34fb047a 100644 --- a/system/bta/gatt/bta_gatts_api.cc +++ b/system/bta/gatt/bta_gatts_api.cc @@ -39,6 +39,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/bta/gatt/database_builder.cc b/system/bta/gatt/database_builder.cc index 878e2f6982..bda546c9d9 100644 --- a/system/bta/gatt/database_builder.cc +++ b/system/bta/gatt/database_builder.cc @@ -33,6 +33,9 @@ #include "stack/include/gattdefs.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/bta/groups/groups_test.cc b/system/bta/groups/groups_test.cc index ea11e169b1..469da52a5d 100644 --- a/system/bta/groups/groups_test.cc +++ b/system/bta/groups/groups_test.cc @@ -24,6 +24,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace groups { diff --git a/system/bta/has/has_client_test.cc b/system/bta/has/has_client_test.cc index 341b6cff51..df98b10a42 100644 --- a/system/bta/has/has_client_test.cc +++ b/system/bta/has/has_client_test.cc @@ -42,6 +42,9 @@ #include "test/common/mock_functions.h" #include "types/bt_transport.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool gatt_profile_get_eatt_support(const RawAddress& addr) { return true; } void osi_property_set_bool(const char* key, bool value); diff --git a/system/bta/hf_client/bta_hf_client_at.cc b/system/bta/hf_client/bta_hf_client_at.cc index 3494a89c37..f3494e215a 100644 --- a/system/bta/hf_client/bta_hf_client_at.cc +++ b/system/bta/hf_client/bta_hf_client_at.cc @@ -42,6 +42,9 @@ /* timeout (in milliseconds) for AT hold timer */ #define BTA_HF_CLIENT_AT_HOLD_TIMEOUT 41 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static constexpr char kPropertyEnhancedDrivingIndicatorEnabled[] = diff --git a/system/bta/hh/bta_hh_main.cc b/system/bta/hh/bta_hh_main.cc index e28f24341c..a4dd1444b4 100644 --- a/system/bta/hh/bta_hh_main.cc +++ b/system/bta/hh/bta_hh_main.cc @@ -35,6 +35,9 @@ #include "osi/include/allocator.h" #include "stack/include/bt_hdr.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/bta/jv/bta_jv_act.cc b/system/bta/jv/bta_jv_act.cc index 5d01fdc6ac..2a3ffaea4b 100644 --- a/system/bta/jv/bta_jv_act.cc +++ b/system/bta/jv/bta_jv_act.cc @@ -54,6 +54,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc b/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc index 793522565e..dac6c9dbd1 100644 --- a/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc +++ b/system/bta/le_audio/audio_hal_client/audio_hal_client_test.cc @@ -31,6 +31,9 @@ #include "hardware/bluetooth.h" #include "osi/include/wakelock.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using ::testing::Assign; using ::testing::AtLeast; diff --git a/system/bta/le_audio/broadcaster/broadcaster_test.cc b/system/bta/le_audio/broadcaster/broadcaster_test.cc index c69a074534..d7babbb2d0 100644 --- a/system/bta/le_audio/broadcaster/broadcaster_test.cc +++ b/system/bta/le_audio/broadcaster/broadcaster_test.cc @@ -41,6 +41,9 @@ #define TEST_BT com::android::bluetooth::flags +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace std::chrono_literals; using bluetooth::le_audio::types::AudioContexts; diff --git a/system/bta/le_audio/broadcaster/state_machine_test.cc b/system/bta/le_audio/broadcaster/state_machine_test.cc index 3cadd15fb6..2dca7c5bee 100644 --- a/system/bta/le_audio/broadcaster/state_machine_test.cc +++ b/system/bta/le_audio/broadcaster/state_machine_test.cc @@ -35,6 +35,9 @@ #define TEST_BT com::android::bluetooth::flags +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::hci::iso_manager; using bluetooth::hci::IsoManager; diff --git a/system/bta/le_audio/client.cc b/system/bta/le_audio/client.cc index e958b6e515..448ad8beda 100644 --- a/system/bta/le_audio/client.cc +++ b/system/bta/le_audio/client.cc @@ -66,6 +66,9 @@ #include "state_machine.h" #include "storage_helper.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Closure; using bluetooth::Uuid; using bluetooth::common::ToString; diff --git a/system/bta/le_audio/codec_manager_test.cc b/system/bta/le_audio/codec_manager_test.cc index 8d0a1f6aa4..13d9afc218 100644 --- a/system/bta/le_audio/codec_manager_test.cc +++ b/system/bta/le_audio/codec_manager_test.cc @@ -30,6 +30,9 @@ #include "test/mock/mock_legacy_hci_interface.h" #include "test/mock/mock_main_shim_entry.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using ::testing::Mock; using ::testing::NiceMock; diff --git a/system/bta/le_audio/device_groups.cc b/system/bta/le_audio/device_groups.cc index b4218cec44..2eda1feee2 100644 --- a/system/bta/le_audio/device_groups.cc +++ b/system/bta/le_audio/device_groups.cc @@ -37,6 +37,9 @@ #include "metrics_collector.h" #include "stack/include/btm_client_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::le_audio { using bluetooth::le_audio::types::ase; diff --git a/system/bta/le_audio/devices.cc b/system/bta/le_audio/devices.cc index 939fe96fc4..28b9be0eed 100644 --- a/system/bta/le_audio/devices.cc +++ b/system/bta/le_audio/devices.cc @@ -35,6 +35,9 @@ #include "osi/include/properties.h" #include "stack/include/btm_client_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::hci::kIsoCigPhy1M; using bluetooth::hci::kIsoCigPhy2M; using bluetooth::le_audio::DeviceConnectState; diff --git a/system/bta/le_audio/devices_test.cc b/system/bta/le_audio/devices_test.cc index 5136834f70..d9845b2deb 100644 --- a/system/bta/le_audio/devices_test.cc +++ b/system/bta/le_audio/devices_test.cc @@ -36,6 +36,9 @@ #include "stack/btm/btm_int_types.h" #include "test/mock/mock_main_shim_entry.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tACL_CONN* btm_bda_to_acl(const RawAddress& bda, tBT_TRANSPORT transport) { return nullptr; } namespace bluetooth { diff --git a/system/bta/le_audio/le_audio_client_test.cc b/system/bta/le_audio/le_audio_client_test.cc index ebda915932..995aff2781 100644 --- a/system/bta/le_audio/le_audio_client_test.cc +++ b/system/bta/le_audio/le_audio_client_test.cc @@ -57,6 +57,9 @@ #define TEST_BT com::android::bluetooth::flags +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using testing::_; using testing::AnyNumber; using testing::AtLeast; diff --git a/system/bta/le_audio/le_audio_health_status_test.cc b/system/bta/le_audio/le_audio_health_status_test.cc index cf32279b9f..0ec96d2f37 100644 --- a/system/bta/le_audio/le_audio_health_status_test.cc +++ b/system/bta/le_audio/le_audio_health_status_test.cc @@ -27,6 +27,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::groups::kGroupUnknown; using bluetooth::le_audio::DeviceConnectState; using bluetooth::le_audio::LeAudioDevice; diff --git a/system/bta/le_audio/le_audio_types.cc b/system/bta/le_audio/le_audio_types.cc index 282a794ad3..aecdc97d6b 100644 --- a/system/bta/le_audio/le_audio_types.cc +++ b/system/bta/le_audio/le_audio_types.cc @@ -31,6 +31,9 @@ #include "le_audio_utils.h" #include "stack/include/bt_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::le_audio { using types::acs_ac_record; using types::LeAudioContextType; diff --git a/system/bta/le_audio/metrics_collector_test.cc b/system/bta/le_audio/metrics_collector_test.cc index e17d23db2e..6110f82fdc 100644 --- a/system/bta/le_audio/metrics_collector_test.cc +++ b/system/bta/le_audio/metrics_collector_test.cc @@ -25,6 +25,9 @@ #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using testing::_; using testing::AnyNumber; using testing::AtLeast; diff --git a/system/bta/le_audio/state_machine_test.cc b/system/bta/le_audio/state_machine_test.cc index 28bed96e55..bfa0aa507a 100644 --- a/system/bta/le_audio/state_machine_test.cc +++ b/system/bta/le_audio/state_machine_test.cc @@ -42,6 +42,9 @@ #include "test/mock/mock_stack_btm_iso.h" #include "types/bt_transport.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::bluetooth::le_audio::DeviceConnectState; using ::bluetooth::le_audio::codec_spec_caps::kLeAudioCodecChannelCountSingleChannel; using ::bluetooth::le_audio::codec_spec_caps::kLeAudioCodecChannelCountTwoChannel; diff --git a/system/bta/le_audio/storage_helper.cc b/system/bta/le_audio/storage_helper.cc index 92f85e37d4..b9f24233c3 100644 --- a/system/bta/le_audio/storage_helper.cc +++ b/system/bta/le_audio/storage_helper.cc @@ -26,6 +26,9 @@ #include "os/log.h" #include "stack/include/bt_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::le_audio::types::hdl_pair; namespace bluetooth::le_audio { diff --git a/system/bta/le_audio/storage_helper_test.cc b/system/bta/le_audio/storage_helper_test.cc index 7e656feaac..07dbb6859d 100644 --- a/system/bta/le_audio/storage_helper_test.cc +++ b/system/bta/le_audio/storage_helper_test.cc @@ -18,6 +18,9 @@ #include <gtest/gtest.h> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::le_audio::LeAudioDevice; namespace bluetooth::le_audio { diff --git a/system/bta/pan/bta_pan_ci.cc b/system/bta/pan/bta_pan_ci.cc index 833216aa52..abd60b0145 100644 --- a/system/bta/pan/bta_pan_ci.cc +++ b/system/bta/pan/bta_pan_ci.cc @@ -28,6 +28,9 @@ #include "stack/include/bt_hdr.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void bta_pan_sm_execute(tBTA_PAN_SCB* p_scb, uint16_t event, tBTA_PAN_DATA* p_data); /******************************************************************************* diff --git a/system/bta/pan/bta_pan_main.cc b/system/bta/pan/bta_pan_main.cc index 57c87e9d50..1f2dc9d2e0 100644 --- a/system/bta/pan/bta_pan_main.cc +++ b/system/bta/pan/bta_pan_main.cc @@ -29,6 +29,9 @@ #include "internal_include/bt_target.h" #include "stack/include/bt_hdr.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/bta/sdp/bta_sdp_act.cc b/system/bta/sdp/bta_sdp_act.cc index 364930d8c5..ab2f120d17 100644 --- a/system/bta/sdp/bta_sdp_act.cc +++ b/system/bta/sdp/bta_sdp_act.cc @@ -39,6 +39,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/bta/test/bta_ag_sco_test.cc b/system/bta/test/bta_ag_sco_test.cc index 78c7902966..16da383021 100644 --- a/system/bta/test/bta_ag_sco_test.cc +++ b/system/bta/test/bta_ag_sco_test.cc @@ -27,6 +27,9 @@ #include "test/mock/mock_device_esco_parameters.h" #include "test/mock/mock_main_shim_entry.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btm_peer_supports_esco_ev3(const RawAddress& remote_bda) { return true; } tBTM_CB btm_cb; LeAudioClient* LeAudioClient::Get() { return nullptr; } diff --git a/system/bta/test/bta_av_test.cc b/system/bta/test/bta_av_test.cc index aecf5a916a..0775b7c54b 100644 --- a/system/bta/test/bta_av_test.cc +++ b/system/bta/test/bta_av_test.cc @@ -24,6 +24,9 @@ #include "test/mock/mock_osi_alarm.h" #include "test/mock/mock_stack_acl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace std::chrono_literals; bool btif_av_both_enable(void) { return true; } diff --git a/system/bta/test/bta_gatt_test.cc b/system/bta/test/bta_gatt_test.cc index b867948a34..2a7909657c 100644 --- a/system/bta/test/bta_gatt_test.cc +++ b/system/bta/test/bta_gatt_test.cc @@ -28,6 +28,9 @@ #include "stack/gatt/gatt_int.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace param { struct { uint16_t conn_id; diff --git a/system/bta/test/common/btif_storage_mock.cc b/system/bta/test/common/btif_storage_mock.cc index d52b8e6369..b74b7678ea 100644 --- a/system/bta/test/common/btif_storage_mock.cc +++ b/system/bta/test/common/btif_storage_mock.cc @@ -19,6 +19,9 @@ #include <bluetooth/log.h> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static bluetooth::storage::MockBtifStorageInterface* btif_storage_interface = nullptr; diff --git a/system/bta/test/common/btm_api_mock.cc b/system/bta/test/common/btm_api_mock.cc index d32e40ebc5..6c2f30797e 100644 --- a/system/bta/test/common/btm_api_mock.cc +++ b/system/bta/test/common/btm_api_mock.cc @@ -26,6 +26,9 @@ #include "test/mock/mock_stack_btm_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static bluetooth::manager::MockBtmInterface* btm_interface = nullptr; diff --git a/system/bta/vc/devices_test.cc b/system/bta/vc/devices_test.cc index 984e7af608..8d951ea7fb 100644 --- a/system/bta/vc/devices_test.cc +++ b/system/bta/vc/devices_test.cc @@ -33,6 +33,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace vc { namespace internal { diff --git a/system/bta/vc/vc_test.cc b/system/bta/vc/vc_test.cc index 3a2d683f89..af4ae2bb27 100644 --- a/system/bta/vc/vc_test.cc +++ b/system/bta/vc/vc_test.cc @@ -37,6 +37,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void btif_storage_add_volume_control(const RawAddress& addr, bool auto_conn) {} struct alarm_t { diff --git a/system/btcore/src/osi_module.cc b/system/btcore/src/osi_module.cc index 77c75fa795..22d8f05398 100644 --- a/system/btcore/src/osi_module.cc +++ b/system/btcore/src/osi_module.cc @@ -27,6 +27,9 @@ #include "osi/include/osi.h" #include "osi/include/wakelock.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + future_t* osi_init(void) { return future_new_immediate(FUTURE_SUCCESS); } future_t* osi_clean_up(void) { diff --git a/system/btcore/test/device_class_test.cc b/system/btcore/test/device_class_test.cc index bdd6c69ce2..af114ffed5 100644 --- a/system/btcore/test/device_class_test.cc +++ b/system/btcore/test/device_class_test.cc @@ -21,6 +21,9 @@ #include <arpa/inet.h> #include <gtest/gtest.h> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + ::testing::AssertionResult check_bitfield(const char* m_expr, const char* n_expr, int m, int n) { if (m == n) { return ::testing::AssertionSuccess(); diff --git a/system/btif/co/bta_av_co.cc b/system/btif/co/bta_av_co.cc index 75f42cb1d3..1364631d26 100644 --- a/system/btif/co/bta_av_co.cc +++ b/system/btif/co/bta_av_co.cc @@ -53,6 +53,9 @@ #include "stack/include/bt_uuid16.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; // SCMS-T protect info diff --git a/system/btif/co/bta_gatts_co.cc b/system/btif/co/bta_gatts_co.cc index b0056d603e..28a24ad17a 100644 --- a/system/btif/co/bta_gatts_co.cc +++ b/system/btif/co/bta_gatts_co.cc @@ -25,6 +25,9 @@ #include "stack/include/gatt_api.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + /***************************************************************************** * Local type definitions ****************************************************************************/ diff --git a/system/btif/co/bta_hh_co.cc b/system/btif/co/bta_hh_co.cc index 0b0141c04e..f43363e3ba 100644 --- a/system/btif/co/bta_hh_co.cc +++ b/system/btif/co/bta_hh_co.cc @@ -41,6 +41,9 @@ #include "storage/config_keys.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + const char* dev_path = "/dev/uhid"; #include "btif_config.h" diff --git a/system/btif/src/bluetooth.cc b/system/btif/src/bluetooth.cc index ba8f77acfe..b2f554e910 100644 --- a/system/btif/src/bluetooth.cc +++ b/system/btif/src/bluetooth.cc @@ -115,6 +115,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::csis::CsisClientInterface; using bluetooth::has::HasClientInterface; using bluetooth::hearing_aid::HearingAidInterface; diff --git a/system/btif/src/btif_a2dp_source.cc b/system/btif/src/btif_a2dp_source.cc index f67527da8b..6f92586419 100644 --- a/system/btif/src/btif_a2dp_source.cc +++ b/system/btif/src/btif_a2dp_source.cc @@ -54,6 +54,9 @@ #include "stack/include/btm_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::audio::a2dp::BluetoothAudioStatus; using bluetooth::common::A2dpSessionMetrics; using bluetooth::common::BluetoothMetricsLogger; diff --git a/system/btif/src/btif_av.cc b/system/btif/src/btif_av.cc index 96956b1dc7..57fb6dd073 100644 --- a/system/btif/src/btif_av.cc +++ b/system/btif/src/btif_av.cc @@ -67,6 +67,9 @@ #include <android/sysprop/BluetoothProperties.sysprop.h> #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/btif/src/btif_avrcp_audio_track.cc b/system/btif/src/btif_avrcp_audio_track.cc index 6b825e5bc1..7a3d27f6a5 100644 --- a/system/btif/src/btif_avrcp_audio_track.cc +++ b/system/btif/src/btif_avrcp_audio_track.cc @@ -32,6 +32,9 @@ #include "internal_include/bt_target.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace android; using namespace bluetooth; diff --git a/system/btif/src/btif_ble_scanner.cc b/system/btif/src/btif_ble_scanner.cc index 1892ba133c..3bfac0c305 100644 --- a/system/btif/src/btif_ble_scanner.cc +++ b/system/btif/src/btif_ble_scanner.cc @@ -20,6 +20,9 @@ #include "main/shim/le_scanning_manager.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + BleScannerInterface* get_ble_scanner_instance() { return bluetooth::shim::get_ble_scanner_instance(); } diff --git a/system/btif/src/btif_bqr.cc b/system/btif/src/btif_bqr.cc index 8aa1e6016f..5d65920f47 100644 --- a/system/btif/src/btif_bqr.cc +++ b/system/btif/src/btif_bqr.cc @@ -45,6 +45,9 @@ #include "stack/include/btm_client_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace bqr { diff --git a/system/btif/src/btif_core.cc b/system/btif/src/btif_core.cc index 2bde8db29a..c73a5cea06 100644 --- a/system/btif/src/btif_core.cc +++ b/system/btif/src/btif_core.cc @@ -64,6 +64,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::PlatformThread; using bluetooth::Uuid; using bluetooth::common::MessageLoopThread; diff --git a/system/btif/src/btif_csis_client.cc b/system/btif/src/btif_csis_client.cc index a7aef9f57b..2a745ca109 100644 --- a/system/btif/src/btif_csis_client.cc +++ b/system/btif/src/btif_csis_client.cc @@ -27,6 +27,9 @@ #include "btif_profile_storage.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Owned; using base::Passed; diff --git a/system/btif/src/btif_dm.cc b/system/btif/src/btif_dm.cc index 97696a1600..a3bfb1a6f8 100644 --- a/system/btif/src/btif_dm.cc +++ b/system/btif/src/btif_dm.cc @@ -105,6 +105,9 @@ #include <android/sysprop/BluetoothProperties.sysprop.h> #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btif_get_address_type(const RawAddress& bda, tBLE_ADDR_TYPE* p_addr_type); bool btif_get_device_type(const RawAddress& bda, int* p_device_type); diff --git a/system/btif/src/btif_gatt.cc b/system/btif/src/btif_gatt.cc index ed20db4821..9bd0eba609 100644 --- a/system/btif/src/btif_gatt.cc +++ b/system/btif/src/btif_gatt.cc @@ -39,6 +39,9 @@ #include "main/shim/distance_measurement_manager.h" #include "main/shim/le_advertising_manager.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + const btgatt_callbacks_t* bt_gatt_callbacks = NULL; /******************************************************************************* diff --git a/system/btif/src/btif_has_client.cc b/system/btif/src/btif_has_client.cc index 1f5f8f72f2..18ae5478cd 100644 --- a/system/btif/src/btif_has_client.cc +++ b/system/btif/src/btif_has_client.cc @@ -28,6 +28,9 @@ #include "btif_profile_storage.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Owned; using base::Passed; diff --git a/system/btif/src/btif_hd.cc b/system/btif/src/btif_hd.cc index fa353f87df..742e9fd87e 100644 --- a/system/btif/src/btif_hd.cc +++ b/system/btif/src/btif_hd.cc @@ -55,6 +55,9 @@ #define COD_HID_COMBO 0x05C0 #define COD_HID_MAJOR 0x0500 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; bool bta_dm_check_if_only_hd_connected(const RawAddress& peer_addr); diff --git a/system/btif/src/btif_hearing_aid.cc b/system/btif/src/btif_hearing_aid.cc index 6ff13d02ac..6c8a689c49 100644 --- a/system/btif/src/btif_hearing_aid.cc +++ b/system/btif/src/btif_hearing_aid.cc @@ -29,6 +29,9 @@ #include "stack/include/main_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Unretained; using bluetooth::hearing_aid::ConnectionState; diff --git a/system/btif/src/btif_hf.cc b/system/btif/src/btif_hf.cc index 3540836184..9ab0745cfe 100644 --- a/system/btif/src/btif_hf.cc +++ b/system/btif/src/btif_hf.cc @@ -55,6 +55,9 @@ #include "stack/include/btm_log_history.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { constexpr char kBtmLogTag[] = "HFP"; } diff --git a/system/btif/src/btif_hf_client.cc b/system/btif/src/btif_hf_client.cc index 1b76260a44..9a6eb128e3 100644 --- a/system/btif/src/btif_hf_client.cc +++ b/system/btif/src/btif_hf_client.cc @@ -68,6 +68,9 @@ #define BTIF_HF_CLIENT_SERVICE_NAME ("Handsfree") #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/btif/src/btif_hh.cc b/system/btif/src/btif_hh.cc index f7983d3c2d..578f4f9315 100644 --- a/system/btif/src/btif_hh.cc +++ b/system/btif/src/btif_hh.cc @@ -66,6 +66,9 @@ #define LOGITECH_KB_MX5500_VENDOR_ID 0x046D #define LOGITECH_KB_MX5500_PRODUCT_ID 0xB30B +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static int btif_hh_keylockstates = 0; // The current key state of each key diff --git a/system/btif/src/btif_iot_config.cc b/system/btif/src/btif_iot_config.cc index 293d8a7bc2..1e70657b2a 100644 --- a/system/btif/src/btif_iot_config.cc +++ b/system/btif/src/btif_iot_config.cc @@ -24,6 +24,9 @@ #include "stack/include/btm_ble_api.h" #include "stack/include/btm_client_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/btif/src/btif_le_audio.cc b/system/btif/src/btif_le_audio.cc index e3dd8e5216..0e4ab09e41 100644 --- a/system/btif/src/btif_le_audio.cc +++ b/system/btif/src/btif_le_audio.cc @@ -26,6 +26,9 @@ #include "btif_profile_storage.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Unretained; using bluetooth::le_audio::btle_audio_codec_config_t; diff --git a/system/btif/src/btif_le_audio_broadcaster.cc b/system/btif/src/btif_le_audio_broadcaster.cc index 199ba63f77..45c4b5b52d 100644 --- a/system/btif/src/btif_le_audio_broadcaster.cc +++ b/system/btif/src/btif_le_audio_broadcaster.cc @@ -24,6 +24,9 @@ #include "btif_common.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Unretained; using bluetooth::le_audio::BroadcastId; diff --git a/system/btif/src/btif_pan.cc b/system/btif/src/btif_pan.cc index 804c5d9fca..f4705f99eb 100644 --- a/system/btif/src/btif_pan.cc +++ b/system/btif/src/btif_pan.cc @@ -73,6 +73,9 @@ #define MIN(x, y) (((x) < (y)) ? (x) : (y)) +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; btpan_cb_t btpan_cb; diff --git a/system/btif/src/btif_profile_storage.cc b/system/btif/src/btif_profile_storage.cc index ab31a63afb..4c5fad6734 100644 --- a/system/btif/src/btif_profile_storage.cc +++ b/system/btif/src/btif_profile_storage.cc @@ -47,6 +47,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using bluetooth::Uuid; using bluetooth::csis::CsisClient; diff --git a/system/btif/src/btif_rc.cc b/system/btif/src/btif_rc.cc index e213b7886a..4eaf0e61e8 100644 --- a/system/btif/src/btif_rc.cc +++ b/system/btif/src/btif_rc.cc @@ -108,6 +108,9 @@ } \ } while (0) +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/btif/src/btif_sdp.cc b/system/btif/src/btif_sdp.cc index bc336acbf6..db75f5eac1 100644 --- a/system/btif/src/btif_sdp.cc +++ b/system/btif/src/btif_sdp.cc @@ -40,6 +40,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/btif/src/btif_sdp_server.cc b/system/btif/src/btif_sdp_server.cc index cd4b9404dd..c7c29188dd 100644 --- a/system/btif/src/btif_sdp_server.cc +++ b/system/btif/src/btif_sdp_server.cc @@ -48,6 +48,9 @@ #include "types/bluetooth/uuid.h" #include "utl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/btif/src/btif_sock_l2cap.cc b/system/btif/src/btif_sock_l2cap.cc index 285338f17b..f864dda287 100644 --- a/system/btif/src/btif_sock_l2cap.cc +++ b/system/btif/src/btif_sock_l2cap.cc @@ -42,6 +42,9 @@ #include "stack/include/l2cdefs.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; struct packet { diff --git a/system/btif/src/btif_sock_rfc.cc b/system/btif/src/btif_sock_rfc.cc index 69b0889ed3..2f5d60415b 100644 --- a/system/btif/src/btif_sock_rfc.cc +++ b/system/btif/src/btif_sock_rfc.cc @@ -45,6 +45,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/btif/src/btif_sock_sco.cc b/system/btif/src/btif_sock_sco.cc index a7e08cc2f2..a03d176e6f 100644 --- a/system/btif/src/btif_sock_sco.cc +++ b/system/btif/src/btif_sock_sco.cc @@ -54,6 +54,9 @@ // socket_read_ready_cb() - local host closed SCO socket // disconnect_completed_cb() - connection terminated +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; typedef struct { diff --git a/system/btif/src/btif_storage.cc b/system/btif/src/btif_storage.cc index 5ff0d89de3..1c30c76d49 100644 --- a/system/btif/src/btif_storage.cc +++ b/system/btif/src/btif_storage.cc @@ -60,6 +60,9 @@ /* This is a local property to add a device found */ #define BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP 0xFF +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/btif/src/btif_vc.cc b/system/btif/src/btif_vc.cc index fb41e40730..e106aed516 100644 --- a/system/btif/src/btif_vc.cc +++ b/system/btif/src/btif_vc.cc @@ -29,6 +29,9 @@ #include "stack/include/main_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Bind; using base::Unretained; using bluetooth::vc::ConnectionState; diff --git a/system/btif/src/stack_manager.cc b/system/btif/src/stack_manager.cc index fadb09658f..e3e4f3ba0b 100644 --- a/system/btif/src/stack_manager.cc +++ b/system/btif/src/stack_manager.cc @@ -99,6 +99,9 @@ static_assert(BTA_HH_INCLUDED, " Host interface device profile is always enabled in the bluetooth stack" "*** Conditional Compilation Directive error"); +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void BTA_dm_on_hw_on(); void BTA_dm_on_hw_off(); diff --git a/system/btif/test/btif_core_test.cc b/system/btif/test/btif_core_test.cc index 8044296b9f..16125b4e80 100644 --- a/system/btif/test/btif_core_test.cc +++ b/system/btif/test/btif_core_test.cc @@ -57,6 +57,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::testing { void set_hal_cbacks(bt_callbacks_t* callbacks); } // namespace bluetooth::testing diff --git a/system/btif/test/btif_profile_queue_test.cc b/system/btif/test/btif_profile_queue_test.cc index d39164b36b..489ba79660 100644 --- a/system/btif/test/btif_profile_queue_test.cc +++ b/system/btif/test/btif_profile_queue_test.cc @@ -26,6 +26,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + typedef void(tBTIF_CBACK)(uint16_t event, char* p_param); typedef void(tBTIF_COPY_CBACK)(uint16_t event, char* p_dest, const char* p_src); diff --git a/system/common/benchmark/thread_performance_benchmark.cc b/system/common/benchmark/thread_performance_benchmark.cc index cfad3627b9..97f0c93b2d 100644 --- a/system/common/benchmark/thread_performance_benchmark.cc +++ b/system/common/benchmark/thread_performance_benchmark.cc @@ -30,6 +30,9 @@ #include "osi/include/fixed_queue.h" #include "osi/include/thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::benchmark::State; using bluetooth::common::MessageLoopThread; diff --git a/system/common/metric_id_allocator_unittest.cc b/system/common/metric_id_allocator_unittest.cc index 028540a94e..778163c62d 100644 --- a/system/common/metric_id_allocator_unittest.cc +++ b/system/common/metric_id_allocator_unittest.cc @@ -25,6 +25,9 @@ #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace testing { using bluetooth::common::MetricIdAllocator; diff --git a/system/common/metrics_linux.cc b/system/common/metrics_linux.cc index 13795f764d..bbd411b11e 100644 --- a/system/common/metrics_linux.cc +++ b/system/common/metrics_linux.cc @@ -21,6 +21,9 @@ #include "common/metrics.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace common { diff --git a/system/common/metrics_unittest.cc b/system/common/metrics_unittest.cc index b2a300f911..86e2ec7a13 100644 --- a/system/common/metrics_unittest.cc +++ b/system/common/metrics_unittest.cc @@ -32,6 +32,9 @@ #define BTM_COD_MAJOR_AUDIO_TEST 0x04 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace testing { using bluetooth::common::A2dpSessionMetrics; diff --git a/system/common/os_utils.cc b/system/common/os_utils.cc index f8fda26915..a4bf8ea314 100644 --- a/system/common/os_utils.cc +++ b/system/common/os_utils.cc @@ -19,6 +19,9 @@ #include <unistd.h> #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool is_bluetooth_uid() { #ifdef __ANDROID__ return getuid() == AID_BLUETOOTH; diff --git a/system/common/test/thread_performance_test.cc b/system/common/test/thread_performance_test.cc index 4eed2fdf10..d6a0ea32ec 100644 --- a/system/common/test/thread_performance_test.cc +++ b/system/common/test/thread_performance_test.cc @@ -31,6 +31,9 @@ #include "osi/include/fixed_queue.h" #include "osi/include/thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::common::MessageLoopThread; using namespace bluetooth; diff --git a/system/device/fuzzer/btdevice_esco_fuzzer.cpp b/system/device/fuzzer/btdevice_esco_fuzzer.cpp index 821d349298..aa06d1fec9 100644 --- a/system/device/fuzzer/btdevice_esco_fuzzer.cpp +++ b/system/device/fuzzer/btdevice_esco_fuzzer.cpp @@ -23,6 +23,9 @@ #include "interop.h" #include "interop_config.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace std; constexpr size_t kNumAddressOctets = 6; constexpr size_t kMaxStringLength = 10; diff --git a/system/device/src/interop.cc b/system/device/src/interop.cc index 2a400e3079..bcb491f33f 100644 --- a/system/device/src/interop.cc +++ b/system/device/src/interop.cc @@ -48,6 +48,9 @@ #include "osi/include/osi.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; #ifdef __ANDROID__ diff --git a/system/embdrv/sbc/decoder/Android.bp b/system/embdrv/sbc/decoder/Android.bp index e13cec2c3d..84184fece7 100644 --- a/system/embdrv/sbc/decoder/Android.bp +++ b/system/embdrv/sbc/decoder/Android.bp @@ -11,6 +11,9 @@ package { cc_library_static { name: "libbt-sbc-decoder", defaults: ["fluoride_defaults"], + cflags: [ + "-Wno-missing-prototypes", + ], srcs: [ "srce/alloc.c", "srce/bitalloc-sbc.c", diff --git a/system/embdrv/sbc/encoder/Android.bp b/system/embdrv/sbc/encoder/Android.bp index 5a4cc5d80c..74fe1ec965 100644 --- a/system/embdrv/sbc/encoder/Android.bp +++ b/system/embdrv/sbc/encoder/Android.bp @@ -10,6 +10,9 @@ package { cc_library_static { name: "libbt-sbc-encoder", defaults: ["fluoride_defaults"], + cflags: [ + "-Wno-missing-prototypes", + ], srcs: [ "srce/sbc_analysis.c", "srce/sbc_dct.c", diff --git a/system/gd/Android.bp b/system/gd/Android.bp index c5dc79e6c0..7064a59e18 100644 --- a/system/gd/Android.bp +++ b/system/gd/Android.bp @@ -287,6 +287,10 @@ cc_binary { defaults: [ "gd_defaults", ], + cflags: [ + // The generated gRPC code triggers these warnings. + "-Wno-missing-prototypes", + ], include_dirs: [ "packages/modules/Bluetooth/system", "packages/modules/Bluetooth/system/include", diff --git a/system/gd/common/metric_id_manager_unittest.cc b/system/gd/common/metric_id_manager_unittest.cc index 2b23c59db4..6c36187a55 100644 --- a/system/gd/common/metric_id_manager_unittest.cc +++ b/system/gd/common/metric_id_manager_unittest.cc @@ -22,6 +22,9 @@ #include <thread> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace testing { using bluetooth::common::MetricIdManager; diff --git a/system/gd/common/strings_test.cc b/system/gd/common/strings_test.cc index c252429ec9..63a9804ab7 100644 --- a/system/gd/common/strings_test.cc +++ b/system/gd/common/strings_test.cc @@ -23,6 +23,9 @@ #include <array> #include <memory> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace testing { using bluetooth::common::BoolFromString; diff --git a/system/gd/dumpsys/bundler/bundler.cc b/system/gd/dumpsys/bundler/bundler.cc index 099c75bc45..a88da57466 100644 --- a/system/gd/dumpsys/bundler/bundler.cc +++ b/system/gd/dumpsys/bundler/bundler.cc @@ -28,6 +28,9 @@ #include "flatbuffers/idl.h" #include "flatbuffers/util.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using namespace dumpsys; diff --git a/system/gd/fuzz_test.cc b/system/gd/fuzz_test.cc index bdb007b295..8b4b2b9786 100644 --- a/system/gd/fuzz_test.cc +++ b/system/gd/fuzz_test.cc @@ -17,6 +17,9 @@ #include <stddef.h> #include <stdint.h> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void RunHciPacketFuzzTest(const uint8_t* data, size_t size); extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { diff --git a/system/gd/hal/snoop_logger_test.cc b/system/gd/hal/snoop_logger_test.cc index 1e3fec1880..ac32603f94 100644 --- a/system/gd/hal/snoop_logger_test.cc +++ b/system/gd/hal/snoop_logger_test.cc @@ -31,6 +31,9 @@ #include "os/system_properties.h" #include "os/utils.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace testing { using bluetooth::hal::SnoopLoggerCommon; diff --git a/system/gd/hci/acl_manager/classic_impl_test.cc b/system/gd/hci/acl_manager/classic_impl_test.cc index 543fa0d0bf..e5aa6d61ae 100644 --- a/system/gd/hci/acl_manager/classic_impl_test.cc +++ b/system/gd/hci/acl_manager/classic_impl_test.cc @@ -33,6 +33,9 @@ #include "packet/bit_inserter.h" #include "packet/raw_builder.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using namespace std::chrono_literals; diff --git a/system/gd/hci/controller_test.cc b/system/gd/hci/controller_test.cc index 305c1e361f..3ea8416469 100644 --- a/system/gd/hci/controller_test.cc +++ b/system/gd/hci/controller_test.cc @@ -33,6 +33,9 @@ #include "os/thread.h" #include "packet/raw_builder.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using namespace std::chrono_literals; diff --git a/system/gd/hci/facade/le_advertising_manager_facade.cc b/system/gd/hci/facade/le_advertising_manager_facade.cc index 88207dd242..43b68aedf5 100644 --- a/system/gd/hci/facade/le_advertising_manager_facade.cc +++ b/system/gd/hci/facade/le_advertising_manager_facade.cc @@ -33,6 +33,9 @@ #include "hci/le_advertising_manager.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace hci { namespace facade { diff --git a/system/gd/hci/fuzz/acl_manager_fuzz_test.cc b/system/gd/hci/fuzz/acl_manager_fuzz_test.cc index 53bf55d6f4..527982ced5 100644 --- a/system/gd/hci/fuzz/acl_manager_fuzz_test.cc +++ b/system/gd/hci/fuzz/acl_manager_fuzz_test.cc @@ -26,6 +26,9 @@ #include "os/fake_timer/fake_timerfd.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::FuzzTestModuleRegistry; using bluetooth::fuzz::GetArbitraryBytes; using bluetooth::hci::AclManager; diff --git a/system/gd/hci/fuzz/hci_layer_fuzz_test.cc b/system/gd/hci/fuzz/hci_layer_fuzz_test.cc index 2c46fa2a0f..48191efe1c 100644 --- a/system/gd/hci/fuzz/hci_layer_fuzz_test.cc +++ b/system/gd/hci/fuzz/hci_layer_fuzz_test.cc @@ -26,6 +26,9 @@ #include "os/fake_timer/fake_timerfd.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::FuzzTestModuleRegistry; using bluetooth::fuzz::GetArbitraryBytes; using bluetooth::hal::HciHal; diff --git a/system/gd/hci/hci_layer_unittest.cc b/system/gd/hci/hci_layer_unittest.cc index b9a0a1b138..1f2526e46d 100644 --- a/system/gd/hci/hci_layer_unittest.cc +++ b/system/gd/hci/hci_layer_unittest.cc @@ -34,6 +34,9 @@ #include "os/thread.h" #include "packet/raw_builder.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace std::chrono_literals; namespace { diff --git a/system/gd/hci/hci_packets_fuzz_test.cc b/system/gd/hci/hci_packets_fuzz_test.cc index 1388f1bbd8..68ebf7e6da 100644 --- a/system/gd/hci/hci_packets_fuzz_test.cc +++ b/system/gd/hci/hci_packets_fuzz_test.cc @@ -22,6 +22,9 @@ #include "packet/bit_inserter.h" #include "packet/raw_builder.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::packet::BitInserter; using bluetooth::packet::RawBuilder; using std::vector; diff --git a/system/gd/hci/le_address_manager.cc b/system/gd/hci/le_address_manager.cc index 5eedc20630..b8ac989b83 100644 --- a/system/gd/hci/le_address_manager.cc +++ b/system/gd/hci/le_address_manager.cc @@ -23,6 +23,9 @@ #include "include/macros.h" #include "os/rand.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace hci { diff --git a/system/gd/hci/le_advertising_manager.cc b/system/gd/hci/le_advertising_manager.cc index 7a3eebf47b..8f342922ac 100644 --- a/system/gd/hci/le_advertising_manager.cc +++ b/system/gd/hci/le_advertising_manager.cc @@ -35,6 +35,9 @@ #include "os/system_properties.h" #include "packet/fragmenting_inserter.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace hci { diff --git a/system/gd/metrics/bluetooth_event.cc b/system/gd/metrics/bluetooth_event.cc index c18412a2bd..86ac065eac 100644 --- a/system/gd/metrics/bluetooth_event.cc +++ b/system/gd/metrics/bluetooth_event.cc @@ -20,6 +20,9 @@ #include "main/shim/helpers.h" #include "os/metrics.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace metrics { diff --git a/system/gd/module_gdx_unittest.cc b/system/gd/module_gdx_unittest.cc index a744e176ab..9d9ee4c7c8 100644 --- a/system/gd/module_gdx_unittest.cc +++ b/system/gd/module_gdx_unittest.cc @@ -32,6 +32,9 @@ #include "module.h" #include "os/handler.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/gd/module_jniloop_unittest.cc b/system/gd/module_jniloop_unittest.cc index 1ce47036b4..98c6b7e09d 100644 --- a/system/gd/module_jniloop_unittest.cc +++ b/system/gd/module_jniloop_unittest.cc @@ -30,6 +30,9 @@ #include "os/handler.h" #include "os/thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/gd/module_mainloop_unittest.cc b/system/gd/module_mainloop_unittest.cc index f9e9ce3419..cac37f83fe 100644 --- a/system/gd/module_mainloop_unittest.cc +++ b/system/gd/module_mainloop_unittest.cc @@ -30,6 +30,9 @@ #include "os/thread.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/gd/os/linux_generic/alarm_timerfd_unittest.cc b/system/gd/os/linux_generic/alarm_timerfd_unittest.cc index aee1b6277e..03d99bb476 100644 --- a/system/gd/os/linux_generic/alarm_timerfd_unittest.cc +++ b/system/gd/os/linux_generic/alarm_timerfd_unittest.cc @@ -23,6 +23,9 @@ #include "gtest/gtest.h" #include "os/alarm.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::common { struct IsSpace { diff --git a/system/gd/os/linux_generic/wakelock_manager.cc b/system/gd/os/linux_generic/wakelock_manager.cc index a5b65ac35b..022904c942 100644 --- a/system/gd/os/linux_generic/wakelock_manager.cc +++ b/system/gd/os/linux_generic/wakelock_manager.cc @@ -28,6 +28,9 @@ #include "os/internal/wakelock_native.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace os { diff --git a/system/main/shim/acl.cc b/system/main/shim/acl.cc index 057a7c41b3..79d6032095 100644 --- a/system/main/shim/acl.cc +++ b/system/main/shim/acl.cc @@ -66,6 +66,9 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern tBTM_CB btm_cb; using namespace bluetooth; diff --git a/system/main/shim/hci_layer.cc b/system/main/shim/hci_layer.cc index 95794f0492..62b3e801ed 100644 --- a/system/main/shim/hci_layer.cc +++ b/system/main/shim/hci_layer.cc @@ -37,6 +37,9 @@ #include "stack/include/hcimsgs.h" #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /** diff --git a/system/main/test/main_shim_test.cc b/system/main/test/main_shim_test.cc index a7e781742d..43d40bc799 100644 --- a/system/main/test/main_shim_test.cc +++ b/system/main/test/main_shim_test.cc @@ -69,6 +69,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using namespace bluetooth; diff --git a/system/osi/src/list.cc b/system/osi/src/list.cc index 5fe07aaf42..d361b18ef9 100644 --- a/system/osi/src/list.cc +++ b/system/osi/src/list.cc @@ -4,6 +4,9 @@ #include "osi/include/allocator.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; struct list_node_t { diff --git a/system/osi/src/stack_power_telemetry.cc b/system/osi/src/stack_power_telemetry.cc index 7f4d513fcc..f8ca11e32c 100644 --- a/system/osi/src/stack_power_telemetry.cc +++ b/system/osi/src/stack_power_telemetry.cc @@ -35,6 +35,9 @@ #include "stack/include/btm_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; time_t get_current_time() { return time(0); } diff --git a/system/osi/src/thread_scheduler.cc b/system/osi/src/thread_scheduler.cc index bb7a44e410..e67b9c662a 100644 --- a/system/osi/src/thread_scheduler.cc +++ b/system/osi/src/thread_scheduler.cc @@ -17,6 +17,9 @@ #include <sched.h> #include <sys/types.h> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { constexpr int kRealTimeFifoSchedulingPriority = 1; } // namespace diff --git a/system/osi/test/alarm_test.cc b/system/osi/test/alarm_test.cc index 5eab1cbc41..a7538a9904 100644 --- a/system/osi/test/alarm_test.cc +++ b/system/osi/test/alarm_test.cc @@ -28,6 +28,9 @@ #include "osi/include/wakelock.h" #include "osi/semaphore.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::Closure; using bluetooth::common::MessageLoopThread; diff --git a/system/osi/test/fuzzers/Android.bp b/system/osi/test/fuzzers/Android.bp index 86f7f82dd0..2d08f5e348 100644 --- a/system/osi/test/fuzzers/Android.bp +++ b/system/osi/test/fuzzers/Android.bp @@ -11,6 +11,9 @@ cc_defaults { name: "libosi_fuzz_defaults", defaults: ["fluoride_osi_defaults"], host_supported: true, + cflags: [ + "-Wno-missing-prototypes", + ], static_libs: [ "libosi", ], diff --git a/system/packet/tests/fuzzers/Android.bp b/system/packet/tests/fuzzers/Android.bp index b002967ae2..e15bbdc993 100644 --- a/system/packet/tests/fuzzers/Android.bp +++ b/system/packet/tests/fuzzers/Android.bp @@ -37,6 +37,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -76,6 +77,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -115,6 +117,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -154,6 +157,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -193,6 +197,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -232,6 +237,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -271,6 +277,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -310,6 +317,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -349,6 +357,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -388,6 +397,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -427,6 +437,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -466,6 +477,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -505,6 +517,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -544,6 +557,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -583,6 +597,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -622,6 +637,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -661,6 +677,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -700,6 +717,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -739,6 +757,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -778,6 +797,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -817,6 +837,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -856,6 +877,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -895,6 +917,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -934,6 +957,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ @@ -973,6 +997,7 @@ cc_fuzz { "libgmock", ], cflags: [ + "-Wno-missing-prototypes", "-Wno-unused-parameter", ], shared_libs: [ diff --git a/system/packet/tests/fuzzers/reject_packet_fuzzer.cc b/system/packet/tests/fuzzers/reject_packet_fuzzer.cc index 5c0ae1d3c7..b06b73f55c 100644 --- a/system/packet/tests/fuzzers/reject_packet_fuzzer.cc +++ b/system/packet/tests/fuzzers/reject_packet_fuzzer.cc @@ -22,6 +22,9 @@ #include "avrcp_test_packets.h" #include "packet_test_helper.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace avrcp { diff --git a/system/profile/avrcp/connection_handler.cc b/system/profile/avrcp/connection_handler.cc index 1c443ca527..3d6a67c964 100644 --- a/system/profile/avrcp/connection_handler.cc +++ b/system/profile/avrcp/connection_handler.cc @@ -38,6 +38,9 @@ #include "stack/include/sdp_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern bool btif_av_peer_is_connected_sink(const RawAddress& peer_address); extern bool btif_av_peer_is_connected_source(const RawAddress& peer_address); extern bool btif_av_both_enable(void); diff --git a/system/profile/avrcp/device.cc b/system/profile/avrcp/device.cc index 526ef2e2f4..1851e88d34 100644 --- a/system/profile/avrcp/device.cc +++ b/system/profile/avrcp/device.cc @@ -36,6 +36,9 @@ #include "packet/avrcp/set_player_application_setting_value.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern bool btif_av_peer_is_connected_sink(const RawAddress& peer_address); extern bool btif_av_both_enable(void); extern bool btif_av_src_sink_coexist_enabled(void); diff --git a/system/profile/avrcp/tests/avrcp_connection_handler_test.cc b/system/profile/avrcp/tests/avrcp_connection_handler_test.cc index ac8217a267..cd1ecbae75 100644 --- a/system/profile/avrcp/tests/avrcp_connection_handler_test.cc +++ b/system/profile/avrcp/tests/avrcp_connection_handler_test.cc @@ -28,6 +28,9 @@ #include "stack/include/sdp_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using ::testing::DoAll; using ::testing::MockFunction; diff --git a/system/profile/avrcp/tests/avrcp_device_fuzz/avrcp_device_fuzz.cc b/system/profile/avrcp/tests/avrcp_device_fuzz/avrcp_device_fuzz.cc index e7c02fd758..5f69a6ac59 100644 --- a/system/profile/avrcp/tests/avrcp_device_fuzz/avrcp_device_fuzz.cc +++ b/system/profile/avrcp/tests/avrcp_device_fuzz/avrcp_device_fuzz.cc @@ -21,6 +21,9 @@ #include "packet_test_helper.h" #include "pass_through_packet.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btif_av_src_sink_coexist_enabled(void) { return true; } namespace bluetooth { diff --git a/system/profile/avrcp/tests/avrcp_device_test.cc b/system/profile/avrcp/tests/avrcp_device_test.cc index 135de5017b..24cf0ff87d 100644 --- a/system/profile/avrcp/tests/avrcp_device_test.cc +++ b/system/profile/avrcp/tests/avrcp_device_test.cc @@ -30,6 +30,9 @@ #include "tests/packet_test_helper.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btif_av_src_sink_coexist_enabled(void) { return true; } namespace bluetooth { diff --git a/system/profile/sdp/common/test/data_element_reader_test.cc b/system/profile/sdp/common/test/data_element_reader_test.cc index 71ba0a4a69..3203098e0d 100644 --- a/system/profile/sdp/common/test/data_element_reader_test.cc +++ b/system/profile/sdp/common/test/data_element_reader_test.cc @@ -20,6 +20,9 @@ #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace sdp { diff --git a/system/rust/Android.bp b/system/rust/Android.bp index 251ef9008e..4281cae7ae 100644 --- a/system/rust/Android.bp +++ b/system/rust/Android.bp @@ -110,6 +110,10 @@ rust_test_host { cc_library_static { name: "libbluetooth_core_rs_bridge", defaults: ["bluetooth_cflags"], + cflags: [ + // The generated code triggers these warnings. + "-Wno-missing-prototypes", + ], srcs: [ "src/connection/ffi/connection_shim.cc", "src/core/ffi/module.cc", diff --git a/system/stack/Android.bp b/system/stack/Android.bp index ff7c956bcd..ba06dddfa8 100644 --- a/system/stack/Android.bp +++ b/system/stack/Android.bp @@ -327,16 +327,13 @@ cc_library_static { cc_defaults { name: "btstack_fuzzer_default", host_supported: true, - cflags: [ - "-Wall", - "-Werror", - "-Wextra", - // Mocked components have too many unused parameters - "-Wno-unused-parameter", - ], defaults: [ + "bluetooth_cflags", "bluetooth_flatbuffer_bundler_defaults", ], + cflags: [ + "-Wno-unused-parameter", + ], include_dirs: [ "packages/modules/Bluetooth/system", "packages/modules/Bluetooth/system/gd", diff --git a/system/stack/acl/ble_acl.cc b/system/stack/acl/ble_acl.cc index aa21fe3fed..c7ad2adbbd 100644 --- a/system/stack/acl/ble_acl.cc +++ b/system/stack/acl/ble_acl.cc @@ -32,6 +32,9 @@ #include "stack/include/l2cap_hci_link_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/acl/btm_acl.cc b/system/stack/acl/btm_acl.cc index dc5d1dc3d5..858f139d27 100644 --- a/system/stack/acl/btm_acl.cc +++ b/system/stack/acl/btm_acl.cc @@ -89,6 +89,9 @@ #define PROPERTY_AUTO_FLUSH_TIMEOUT "bluetooth.core.classic.auto_flush_timeout" #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using bluetooth::legacy::hci::GetInterface; diff --git a/system/stack/acl/btm_pm.cc b/system/stack/acl/btm_pm.cc index 3edf398087..f77efd47b7 100644 --- a/system/stack/acl/btm_pm.cc +++ b/system/stack/acl/btm_pm.cc @@ -50,6 +50,9 @@ #include "stack/include/btm_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote); diff --git a/system/stack/ais/ais_ble.cc b/system/stack/ais/ais_ble.cc index c35c4a2acb..879797ed34 100644 --- a/system/stack/ais/ais_ble.cc +++ b/system/stack/ais/ais_ble.cc @@ -28,6 +28,9 @@ #include "stack/include/gatt_api.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using bluetooth::log::error; using bluetooth::log::warn; diff --git a/system/stack/avdt/avdt_msg.cc b/system/stack/avdt/avdt_msg.cc index 28f3d12932..28535033d2 100644 --- a/system/stack/avdt/avdt_msg.cc +++ b/system/stack/avdt/avdt_msg.cc @@ -41,6 +41,9 @@ #include "stack/include/bt_hdr.h" #include "stack/include/bt_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/stack/avdt/avdt_scb_act.cc b/system/stack/avdt/avdt_scb_act.cc index 3785876c4b..4eec721d46 100644 --- a/system/stack/avdt/avdt_scb_act.cc +++ b/system/stack/avdt/avdt_scb_act.cc @@ -39,6 +39,9 @@ #include "stack/include/l2cap_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /* This table is used to lookup the callback event that matches a particular diff --git a/system/stack/avrc/avrc_api.cc b/system/stack/avrc/avrc_api.cc index 6d97d5c6af..60d1da067e 100644 --- a/system/stack/avrc/avrc_api.cc +++ b/system/stack/avrc/avrc_api.cc @@ -42,6 +42,9 @@ #include "storage/config_keys.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/stack/avrc/avrc_bld_tg.cc b/system/stack/avrc/avrc_bld_tg.cc index e6ca39167e..6390232293 100644 --- a/system/stack/avrc/avrc_bld_tg.cc +++ b/system/stack/avrc/avrc_bld_tg.cc @@ -31,6 +31,9 @@ #include "stack/include/bt_hdr.h" #include "stack/include/bt_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/stack/avrc/avrc_pars_ct.cc b/system/stack/avrc/avrc_pars_ct.cc index 805365cc6f..045cee3dd2 100644 --- a/system/stack/avrc/avrc_pars_ct.cc +++ b/system/stack/avrc/avrc_pars_ct.cc @@ -26,6 +26,9 @@ #include "osi/include/osi.h" #include "stack/include/bt_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** diff --git a/system/stack/bnep/bnep_utils.cc b/system/stack/bnep/bnep_utils.cc index 06566d85b3..252facf668 100644 --- a/system/stack/bnep/bnep_utils.cc +++ b/system/stack/bnep/bnep_utils.cc @@ -37,6 +37,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using bluetooth::Uuid; diff --git a/system/stack/btm/btm_ble.cc b/system/stack/btm/btm_ble.cc index 1e7cbfece1..e71dfe67fa 100644 --- a/system/stack/btm/btm_ble.cc +++ b/system/stack/btm/btm_ble.cc @@ -42,6 +42,9 @@ #include "stack/include/gatt_api.h" #include "stack/include/hcimsgs.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_ble_gap.cc b/system/stack/btm/btm_ble_gap.cc index 6a7f61a3a8..bd92d9121d 100644 --- a/system/stack/btm/btm_ble_gap.cc +++ b/system/stack/btm/btm_ble_gap.cc @@ -69,6 +69,9 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_ble_privacy.cc b/system/stack/btm/btm_ble_privacy.cc index eeb2098020..bba53e0448 100644 --- a/system/stack/btm/btm_ble_privacy.cc +++ b/system/stack/btm/btm_ble_privacy.cc @@ -40,6 +40,9 @@ #include "stack/include/btm_client_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc index bd6283189f..9927751bb1 100644 --- a/system/stack/btm/btm_ble_sec.cc +++ b/system/stack/btm/btm_ble_sec.cc @@ -60,6 +60,9 @@ #include "stack/include/smp_api_types.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_dev.cc b/system/stack/btm/btm_dev.cc index 76a69b5fbe..ad5ad9de15 100644 --- a/system/stack/btm/btm_dev.cc +++ b/system/stack/btm/btm_dev.cc @@ -48,6 +48,9 @@ #include "stack/include/l2cap_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_devctl.cc b/system/stack/btm/btm_devctl.cc index 9b627f41e8..86f4af00e4 100644 --- a/system/stack/btm/btm_devctl.cc +++ b/system/stack/btm/btm_devctl.cc @@ -49,6 +49,9 @@ #include "stack/include/l2cap_controller_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace ::bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/btm/btm_inq.cc b/system/stack/btm/btm_inq.cc index a2992cb210..255b9cb69b 100644 --- a/system/stack/btm/btm_inq.cc +++ b/system/stack/btm/btm_inq.cc @@ -85,6 +85,9 @@ ((uint32_t)1 << (((uint32_t)(service)) % BTM_EIR_ARRAY_BITS))) >> \ (((uint32_t)(service)) % BTM_EIR_ARRAY_BITS)) +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { constexpr char kBtmLogTag[] = "SCAN"; diff --git a/system/stack/btm/btm_iot_config.cc b/system/stack/btm/btm_iot_config.cc index d1fc5b2f24..27990d3e86 100644 --- a/system/stack/btm/btm_iot_config.cc +++ b/system/stack/btm/btm_iot_config.cc @@ -26,6 +26,9 @@ #include "stack/acl/acl.h" #include "stack/include/btm_client_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/stack/btm/btm_main.cc b/system/stack/btm/btm_main.cc index 0925a68f04..d07769b157 100644 --- a/system/stack/btm/btm_main.cc +++ b/system/stack/btm/btm_main.cc @@ -33,6 +33,9 @@ #include "stack/include/security_client_callbacks.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /* Global BTM control block structure diff --git a/system/stack/btm/btm_sco.cc b/system/stack/btm/btm_sco.cc index 5ad176fc56..e7a33541d9 100644 --- a/system/stack/btm/btm_sco.cc +++ b/system/stack/btm/btm_sco.cc @@ -63,6 +63,9 @@ #include "stack/include/stack_metrics_logging.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern tBTM_CB btm_cb; /* Default to allow enhanced connections where supported. */ diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc index f310bde7bd..bbb765b380 100644 --- a/system/stack/btm/btm_sec.cc +++ b/system/stack/btm/btm_sec.cc @@ -77,6 +77,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { constexpr char kBtmLogTag[] = "SEC"; diff --git a/system/stack/btu/btu_event.cc b/system/stack/btu/btu_event.cc index d1bfc5b2ca..02d701d6f6 100644 --- a/system/stack/btu/btu_event.cc +++ b/system/stack/btu/btu_event.cc @@ -20,6 +20,9 @@ #include "stack/include/bt_types.h" #include "stack/include/btu_hcif.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::hci::IsoManager; void btu_hci_msg_process(BT_HDR* p_msg) { diff --git a/system/stack/btu/btu_hcif.cc b/system/stack/btu/btu_hcif.cc index d392f29fdd..f184626779 100644 --- a/system/stack/btu/btu_hcif.cc +++ b/system/stack/btu/btu_hcif.cc @@ -59,6 +59,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using base::Location; using bluetooth::hci::IsoManager; diff --git a/system/stack/fuzzers/avrc_fuzzer.cc b/system/stack/fuzzers/avrc_fuzzer.cc index 21662d28b4..03267249fd 100644 --- a/system/stack/fuzzers/avrc_fuzzer.cc +++ b/system/stack/fuzzers/avrc_fuzzer.cc @@ -34,6 +34,9 @@ #include "test/mock/mock_stack_l2cap_ble.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/fuzzers/bnep_fuzzer.cc b/system/stack/fuzzers/bnep_fuzzer.cc index 6976ccd602..4ad6bffb0b 100644 --- a/system/stack/fuzzers/bnep_fuzzer.cc +++ b/system/stack/fuzzers/bnep_fuzzer.cc @@ -31,6 +31,9 @@ #include "test/mock/mock_stack_l2cap_ble.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; namespace { diff --git a/system/stack/fuzzers/gatt_fuzzer.cc b/system/stack/fuzzers/gatt_fuzzer.cc index e2ccb35eff..3aa0f8ce01 100644 --- a/system/stack/fuzzers/gatt_fuzzer.cc +++ b/system/stack/fuzzers/gatt_fuzzer.cc @@ -33,6 +33,9 @@ #include "test/mock/mock_stack_l2cap_api.h" #include "test/mock/mock_stack_l2cap_ble.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; bt_status_t do_in_main_thread(base::OnceCallback<void()>) { // this is not properly mocked, so we use abort to catch if this is used in diff --git a/system/stack/fuzzers/l2cap_fuzzer.cc b/system/stack/fuzzers/l2cap_fuzzer.cc index f8714cc3f3..f9fff7ff80 100644 --- a/system/stack/fuzzers/l2cap_fuzzer.cc +++ b/system/stack/fuzzers/l2cap_fuzzer.cc @@ -41,6 +41,9 @@ #include "test/mock/mock_stack_acl.h" #include "test/mock/mock_stack_btm_devctl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using testing::Return; using namespace bluetooth; diff --git a/system/stack/fuzzers/rfcomm_fuzzer.cc b/system/stack/fuzzers/rfcomm_fuzzer.cc index 8652c7e90a..238354d642 100644 --- a/system/stack/fuzzers/rfcomm_fuzzer.cc +++ b/system/stack/fuzzers/rfcomm_fuzzer.cc @@ -38,6 +38,9 @@ #include "test/mock/mock_stack_l2cap_ble.h" #include "test/rfcomm/stack_rfcomm_test_utils.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace hal { class SnoopLogger; diff --git a/system/stack/fuzzers/sdp_fuzzer.cc b/system/stack/fuzzers/sdp_fuzzer.cc index de994d415e..8fbcb8f7d8 100644 --- a/system/stack/fuzzers/sdp_fuzzer.cc +++ b/system/stack/fuzzers/sdp_fuzzer.cc @@ -31,6 +31,9 @@ #include "test/mock/mock_stack_l2cap_api.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { #define SDP_DB_SIZE 0x10000 diff --git a/system/stack/fuzzers/smp_fuzzer.cc b/system/stack/fuzzers/smp_fuzzer.cc index 4c66c4c4bc..e8f3ba8d91 100644 --- a/system/stack/fuzzers/smp_fuzzer.cc +++ b/system/stack/fuzzers/smp_fuzzer.cc @@ -33,6 +33,9 @@ #include "test/mock/mock_stack_l2cap_api.h" #include "test/mock/mock_stack_l2cap_ble.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bluetooth::common::MessageLoopThread* main_thread_ptr = nullptr; bluetooth::common::MessageLoopThread* get_main_thread() { return main_thread_ptr; } diff --git a/system/stack/gap/gap_ble.cc b/system/stack/gap/gap_ble.cc index a1853eeb34..92c826afc3 100644 --- a/system/stack/gap/gap_ble.cc +++ b/system/stack/gap/gap_ble.cc @@ -33,6 +33,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/gap/gap_conn.cc b/system/stack/gap/gap_conn.cc index 1375b3e838..8208edf4d5 100644 --- a/system/stack/gap/gap_conn.cc +++ b/system/stack/gap/gap_conn.cc @@ -34,6 +34,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /* Define the GAP Connection Control Block */ diff --git a/system/stack/gatt/att_protocol.cc b/system/stack/gatt/att_protocol.cc index af8cfdc7d8..60bf695167 100644 --- a/system/stack/gatt/att_protocol.cc +++ b/system/stack/gatt/att_protocol.cc @@ -37,6 +37,9 @@ #define GATT_OP_CODE_SIZE 1 #define GATT_START_END_HANDLE_SIZE 4 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::StringPrintf; using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/gatt/connection_manager.cc b/system/stack/gatt/connection_manager.cc index ccd902da00..6b6f8a71ba 100644 --- a/system/stack/gatt/connection_manager.cc +++ b/system/stack/gatt/connection_manager.cc @@ -41,6 +41,9 @@ #define DIRECT_CONNECT_TIMEOUT (30 * 1000) /* 30 seconds */ +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; constexpr char kBtmLogTag[] = "TA"; diff --git a/system/stack/gatt/gatt_api.cc b/system/stack/gatt/gatt_api.cc index ba5ec14527..3715292f89 100644 --- a/system/stack/gatt/gatt_api.cc +++ b/system/stack/gatt/gatt_api.cc @@ -52,6 +52,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::legacy::stack::sdp; using namespace bluetooth; diff --git a/system/stack/gatt/gatt_attr.cc b/system/stack/gatt/gatt_attr.cc index 9cb7d1323d..a4b2935c52 100644 --- a/system/stack/gatt/gatt_attr.cc +++ b/system/stack/gatt/gatt_attr.cc @@ -40,6 +40,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using base::StringPrintf; using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/gatt/gatt_auth.cc b/system/stack/gatt/gatt_auth.cc index 7ed047b8eb..fc11e2570c 100644 --- a/system/stack/gatt/gatt_auth.cc +++ b/system/stack/gatt/gatt_auth.cc @@ -39,6 +39,9 @@ #include "stack/include/btm_status.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/stack/gatt/gatt_cl.cc b/system/stack/gatt/gatt_cl.cc index de1923a4dc..28ee7fb4a3 100644 --- a/system/stack/gatt/gatt_cl.cc +++ b/system/stack/gatt/gatt_cl.cc @@ -51,6 +51,9 @@ #define L2CAP_PKT_OVERHEAD 4 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using bluetooth::Uuid; using bluetooth::eatt::EattChannel; diff --git a/system/stack/gatt/gatt_db.cc b/system/stack/gatt/gatt_db.cc index 1b5cf2385b..2141fd47eb 100644 --- a/system/stack/gatt/gatt_db.cc +++ b/system/stack/gatt/gatt_db.cc @@ -31,6 +31,9 @@ #include "stack/include/l2cap_types.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/gatt/gatt_main.cc b/system/stack/gatt/gatt_main.cc index d8c5a1c75a..8e0c4d0b93 100644 --- a/system/stack/gatt/gatt_main.cc +++ b/system/stack/gatt/gatt_main.cc @@ -52,6 +52,9 @@ #include "stack/include/srvc_api.h" // tDIS_VALUE #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::eatt::EattExtension; using namespace bluetooth; diff --git a/system/stack/gatt/gatt_sr.cc b/system/stack/gatt/gatt_sr.cc index 979bd4a3c2..cfd48fbeb4 100644 --- a/system/stack/gatt/gatt_sr.cc +++ b/system/stack/gatt/gatt_sr.cc @@ -44,6 +44,9 @@ #define GATT_MTU_REQ_MIN_LEN 2 #define L2CAP_PKT_OVERHEAD 4 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using bluetooth::eatt::EattChannel; using bluetooth::eatt::EattExtension; diff --git a/system/stack/gatt/gatt_utils.cc b/system/stack/gatt/gatt_utils.cc index f15b880d88..1aa1923857 100644 --- a/system/stack/gatt/gatt_utils.cc +++ b/system/stack/gatt/gatt_utils.cc @@ -49,6 +49,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr); using namespace bluetooth::legacy::stack::sdp; diff --git a/system/stack/hid/hidh_api.cc b/system/stack/hid/hidh_api.cc index d61bc06bdf..72c30e3f13 100644 --- a/system/stack/hid/hidh_api.cc +++ b/system/stack/hid/hidh_api.cc @@ -43,6 +43,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; using namespace bluetooth::legacy::stack::sdp; using bluetooth::Uuid; diff --git a/system/stack/l2cap/l2c_api.cc b/system/stack/l2cap/l2c_api.cc index ec703e6dfa..cb66ec209d 100644 --- a/system/stack/l2cap/l2c_api.cc +++ b/system/stack/l2cap/l2c_api.cc @@ -49,6 +49,9 @@ #include "stack/l2cap/l2c_int.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern fixed_queue_t* btu_general_alarm_queue; diff --git a/system/stack/l2cap/l2c_ble.cc b/system/stack/l2cap/l2c_ble.cc index ab18235791..e2a1fbceff 100644 --- a/system/stack/l2cap/l2c_ble.cc +++ b/system/stack/l2cap/l2c_ble.cc @@ -57,6 +57,9 @@ #include "stack/l2cap/l2c_int.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/stack/l2cap/l2c_ble_conn_params.cc b/system/stack/l2cap/l2c_ble_conn_params.cc index 46d1b0d0b4..f617e59d5d 100644 --- a/system/stack/l2cap/l2c_ble_conn_params.cc +++ b/system/stack/l2cap/l2c_ble_conn_params.cc @@ -43,6 +43,9 @@ #include "stack/l2cap/l2c_int.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; void l2cble_start_conn_update(tL2C_LCB* p_lcb); diff --git a/system/stack/l2cap/l2c_link.cc b/system/stack/l2cap/l2c_link.cc index d9582b65c3..baf9d4c2dd 100644 --- a/system/stack/l2cap/l2c_link.cc +++ b/system/stack/l2cap/l2c_link.cc @@ -46,6 +46,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; extern tBTM_CB btm_cb; diff --git a/system/stack/l2cap/l2c_main.cc b/system/stack/l2cap/l2c_main.cc index 9d5645e9c1..9259283109 100644 --- a/system/stack/l2cap/l2c_main.cc +++ b/system/stack/l2cap/l2c_main.cc @@ -40,6 +40,9 @@ #include "stack/include/l2cdefs.h" #include "stack/l2cap/l2c_int.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************/ diff --git a/system/stack/l2cap/l2c_utils.cc b/system/stack/l2cap/l2c_utils.cc index 8e69744d82..a45d2c1e68 100644 --- a/system/stack/l2cap/l2c_utils.cc +++ b/system/stack/l2cap/l2c_utils.cc @@ -50,6 +50,9 @@ #include "stack/l2cap/l2c_int.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb); // TODO Move diff --git a/system/stack/rfcomm/rfc_ts_frames.cc b/system/stack/rfcomm/rfc_ts_frames.cc index b0b4b1c143..93bf02a0a4 100644 --- a/system/stack/rfcomm/rfc_ts_frames.cc +++ b/system/stack/rfcomm/rfc_ts_frames.cc @@ -35,6 +35,9 @@ #include "stack/rfcomm/port_int.h" #include "stack/rfcomm/rfc_int.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/stack/rnr/remote_name_request.cc b/system/stack/rnr/remote_name_request.cc index da7ae2c2e9..ed6801a855 100644 --- a/system/stack/rnr/remote_name_request.cc +++ b/system/stack/rnr/remote_name_request.cc @@ -27,6 +27,9 @@ #include "stack/btm/security_device_record.h" #include "stack/include/btm_client_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern tBTM_CB btm_cb; using namespace bluetooth; diff --git a/system/stack/sdp/sdp_db.cc b/system/stack/sdp/sdp_db.cc index b381089aa4..e7bd4cf37b 100644 --- a/system/stack/sdp/sdp_db.cc +++ b/system/stack/sdp/sdp_db.cc @@ -38,6 +38,9 @@ #include "stack/sdp/sdp_discovery_db.h" #include "stack/sdp/sdpint.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /******************************************************************************* diff --git a/system/stack/sdp/sdp_discovery.cc b/system/stack/sdp/sdp_discovery.cc index 73f15d1acd..0142937104 100644 --- a/system/stack/sdp/sdp_discovery.cc +++ b/system/stack/sdp/sdp_discovery.cc @@ -38,6 +38,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::Uuid; using namespace bluetooth; diff --git a/system/stack/sdp/sdp_server.cc b/system/stack/sdp/sdp_server.cc index 7061cc5885..58a17727cf 100644 --- a/system/stack/sdp/sdp_server.cc +++ b/system/stack/sdp/sdp_server.cc @@ -61,6 +61,9 @@ #define PBAP_1_2 0x0102 #define PBAP_1_2_BL_LEN 14 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /* Used to set PBAP local SDP device record for PBAP 1.2 upgrade */ diff --git a/system/stack/smp/smp_act.cc b/system/stack/smp/smp_act.cc index 655a2061e5..07502a2a88 100644 --- a/system/stack/smp/smp_act.cc +++ b/system/stack/smp/smp_act.cc @@ -42,6 +42,9 @@ #include "stack/include/smp_api_types.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/stack/smp/smp_keys.cc b/system/stack/smp/smp_keys.cc index 7369ff0ccc..801a3d4e63 100644 --- a/system/stack/smp/smp_keys.cc +++ b/system/stack/smp/smp_keys.cc @@ -47,6 +47,9 @@ #include "stack/include/main_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::common::BindOnce; using bluetooth::common::OnceCallback; using crypto_toolbox::aes_128; diff --git a/system/stack/smp/smp_utils.cc b/system/stack/smp/smp_utils.cc index 848bced48a..01a045bda9 100644 --- a/system/stack/smp/smp_utils.cc +++ b/system/stack/smp/smp_utils.cc @@ -71,6 +71,9 @@ Check*/) #define SMP_PAIR_KEYPR_NOTIF_SIZE (1 /* opcode */ + 1 /*Notif Type*/) +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; namespace { diff --git a/system/stack/srvc/srvc_dis.cc b/system/stack/srvc/srvc_dis.cc index 402ec14feb..58f6befd11 100644 --- a/system/stack/srvc/srvc_dis.cc +++ b/system/stack/srvc/srvc_dis.cc @@ -33,6 +33,9 @@ #include "types/bluetooth/uuid.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; static const uint16_t dis_attr_uuid[] = { diff --git a/system/stack/test/a2dp/mock_bta_av_codec.cc b/system/stack/test/a2dp/mock_bta_av_codec.cc index c4a30a7081..c261bebfe9 100644 --- a/system/stack/test/a2dp/mock_bta_av_codec.cc +++ b/system/stack/test/a2dp/mock_bta_av_codec.cc @@ -16,4 +16,7 @@ #include "a2dp_codec_api.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + A2dpCodecConfig* bta_av_get_a2dp_current_codec(void) { return nullptr; } diff --git a/system/stack/test/btm/stack_btm_inq_test.cc b/system/stack/test/btm/stack_btm_inq_test.cc index 6262915a2c..160ff6124f 100644 --- a/system/stack/test/btm/stack_btm_inq_test.cc +++ b/system/stack/test/btm/stack_btm_inq_test.cc @@ -36,6 +36,9 @@ #include "test/mock/mock_main_shim_entry.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern tBTM_CB btm_cb; using bluetooth::common::ContextualCallback; diff --git a/system/stack/test/btm/stack_btm_test.cc b/system/stack/test/btm/stack_btm_test.cc index aeaaf68913..c1b90eeef9 100644 --- a/system/stack/test/btm/stack_btm_test.cc +++ b/system/stack/test/btm/stack_btm_test.cc @@ -38,6 +38,9 @@ #include "test/mock/mock_main_shim_entry.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using ::testing::Each; using ::testing::Eq; diff --git a/system/stack/test/btm_iso_test.cc b/system/stack/test/btm_iso_test.cc index 489a356f4e..50a4948b34 100644 --- a/system/stack/test/btm_iso_test.cc +++ b/system/stack/test/btm_iso_test.cc @@ -32,6 +32,9 @@ #include "test/mock/mock_main_shim_entry.h" #include "test/mock/mock_main_shim_hci_layer.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::hci::IsoManager; using testing::_; using testing::AnyNumber; diff --git a/system/stack/test/common/mock_btif_storage.cc b/system/stack/test/common/mock_btif_storage.cc index ae11b0d3e4..bf51e41c63 100644 --- a/system/stack/test/common/mock_btif_storage.cc +++ b/system/stack/test/common/mock_btif_storage.cc @@ -20,6 +20,9 @@ #include "stack/include/btm_sec_api_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static bluetooth::manager::MockBtifStorageInterface* btif_storage_interface = nullptr; void bluetooth::manager::SetMockBtifStorageInterface( diff --git a/system/stack/test/common/mock_btm_api_layer.cc b/system/stack/test/common/mock_btm_api_layer.cc index cc9389289d..735d6be806 100644 --- a/system/stack/test/common/mock_btm_api_layer.cc +++ b/system/stack/test/common/mock_btm_api_layer.cc @@ -17,6 +17,9 @@ #include "mock_btm_api_layer.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static bluetooth::manager::MockBtmApiInterface* btm_api_interface = nullptr; void bluetooth::manager::SetMockBtmApiInterface(MockBtmApiInterface* mock_btm_api_interface) { @@ -40,4 +43,4 @@ bool BTM_IsLinkKeyKnown(const RawAddress& remote_bd_addr, tBT_TRANSPORT transpor uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr) { return btm_api_interface->ReadSecKeySize(bd_addr); -}
\ No newline at end of file +} diff --git a/system/stack/test/common/mock_btm_layer.cc b/system/stack/test/common/mock_btm_layer.cc index 2dd17a3a7e..acfb6357a6 100644 --- a/system/stack/test/common/mock_btm_layer.cc +++ b/system/stack/test/common/mock_btm_layer.cc @@ -22,6 +22,9 @@ #include "stack/include/rfcdefs.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static bluetooth::manager::MockBtmSecurityInternalInterface* btm_security_internal_interface = nullptr; diff --git a/system/stack/test/common/mock_btu_layer.cc b/system/stack/test/common/mock_btu_layer.cc index cc9ef53c79..26ab4b58c5 100644 --- a/system/stack/test/common/mock_btu_layer.cc +++ b/system/stack/test/common/mock_btu_layer.cc @@ -18,4 +18,7 @@ #include "common/message_loop_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bluetooth::common::MessageLoopThread* get_main_thread() { return nullptr; } diff --git a/system/stack/test/common/mock_l2cap_layer.cc b/system/stack/test/common/mock_l2cap_layer.cc index 287743dab7..c2c6ab18a0 100644 --- a/system/stack/test/common/mock_l2cap_layer.cc +++ b/system/stack/test/common/mock_l2cap_layer.cc @@ -23,6 +23,9 @@ #include "stack/l2cap/l2c_int.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static bluetooth::l2cap::MockL2capInterface* l2cap_interface = nullptr; void bluetooth::l2cap::SetMockInterface(MockL2capInterface* mock_l2cap_interface) { diff --git a/system/stack/test/common/mock_stack_avdt_msg.cc b/system/stack/test/common/mock_stack_avdt_msg.cc index 8684861845..76ff6ac8c4 100644 --- a/system/stack/test/common/mock_stack_avdt_msg.cc +++ b/system/stack/test/common/mock_stack_avdt_msg.cc @@ -25,6 +25,9 @@ * Need to consider more sophisticated existing methods. */ +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static std::vector<uint8_t> _rsp_sig_ids{}; void avdt_msg_send_rsp(AvdtpCcb* p_ccb, uint8_t sig_id, tAVDT_MSG* p_params) { diff --git a/system/stack/test/eatt/eatt_test.cc b/system/stack/test/eatt/eatt_test.cc index d89fb268bc..0965fc5987 100644 --- a/system/stack/test/eatt/eatt_test.cc +++ b/system/stack/test/eatt/eatt_test.cc @@ -36,6 +36,9 @@ #include "test/mock/mock_stack_l2cap_interface.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using testing::_; using testing::DoAll; using testing::MockFunction; diff --git a/system/stack/test/fuzzers/Android.bp b/system/stack/test/fuzzers/Android.bp index d7559762c6..92de791e1b 100644 --- a/system/stack/test/fuzzers/Android.bp +++ b/system/stack/test/fuzzers/Android.bp @@ -15,6 +15,10 @@ cc_defaults { "latest_android_hardware_bluetooth_audio_ndk_static", "latest_android_media_audio_common_types_ndk_static", ], + cflags: [ + // Fuzzers are hopeless.. + "-Wno-missing-prototypes", + ], include_dirs: [ "packages/modules/Bluetooth/system/", "packages/modules/Bluetooth/system/gd/", diff --git a/system/stack/test/gatt/mock_gatt_utils_ref.cc b/system/stack/test/gatt/mock_gatt_utils_ref.cc index cab85bcfa6..564a2e555a 100644 --- a/system/stack/test/gatt/mock_gatt_utils_ref.cc +++ b/system/stack/test/gatt/mock_gatt_utils_ref.cc @@ -18,6 +18,9 @@ #include "stack/include/bt_hdr.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + /** stack/gatt/connection_manager.cc */ namespace connection_manager { bool background_connect_remove(uint8_t app_id, const RawAddress& address) { return false; } diff --git a/system/stack/test/gatt_connection_manager_test.cc b/system/stack/test/gatt_connection_manager_test.cc index 16eabbc671..e791210608 100644 --- a/system/stack/test/gatt_connection_manager_test.cc +++ b/system/stack/test/gatt_connection_manager_test.cc @@ -12,6 +12,9 @@ #include "stack/btm/neighbor_inquiry.h" #include "stack/gatt/connection_manager.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using testing::_; using testing::DoAll; using testing::Mock; diff --git a/system/stack/test/hid/stack_hid_test.cc b/system/stack/test/hid/stack_hid_test.cc index f9f27fbdf2..7fc527ac2b 100644 --- a/system/stack/test/hid/stack_hid_test.cc +++ b/system/stack/test/hid/stack_hid_test.cc @@ -23,6 +23,9 @@ #include "test/common/mock_functions.h" #include "test/mock/mock_stack_l2cap_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bluetooth::common::MessageLoopThread* get_main_thread() { return nullptr; } tHCI_REASON btm_get_acl_disc_reason_code(void) { return HCI_SUCCESS; } diff --git a/system/stack/test/rfcomm/stack_rfcomm_test.cc b/system/stack/test/rfcomm/stack_rfcomm_test.cc index 4e94eb4014..c15bd8fb55 100644 --- a/system/stack/test/rfcomm/stack_rfcomm_test.cc +++ b/system/stack/test/rfcomm/stack_rfcomm_test.cc @@ -34,6 +34,9 @@ #include "stack/test/rfcomm/stack_rfcomm_test_utils.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; std::string DumpByteBufferToString(uint8_t* p_data, size_t len) { diff --git a/system/stack/test/rfcomm/stack_rfcomm_test_utils.cc b/system/stack/test/rfcomm/stack_rfcomm_test_utils.cc index 77e3c39e80..f11639bc0f 100644 --- a/system/stack/test/rfcomm/stack_rfcomm_test_utils.cc +++ b/system/stack/test/rfcomm/stack_rfcomm_test_utils.cc @@ -25,6 +25,9 @@ #include "stack/rfcomm/rfc_int.h" #include "stack_test_packet_utils.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace rfcomm { diff --git a/system/stack/test/sdp/stack_sdp_test.cc b/system/stack/test/sdp/stack_sdp_test.cc index 8c1bd4e253..a60f808b4b 100644 --- a/system/stack/test/sdp/stack_sdp_test.cc +++ b/system/stack/test/sdp/stack_sdp_test.cc @@ -36,6 +36,9 @@ #define BT_DEFAULT_BUFFER_SIZE (4096 + 16) #endif +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using ::testing::_; using ::testing::DoAll; using ::testing::Invoke; diff --git a/system/stack/test/sdp/stack_sdp_utils_test.cc b/system/stack/test/sdp/stack_sdp_utils_test.cc index 764df1affc..c089f48df7 100644 --- a/system/stack/test/sdp/stack_sdp_utils_test.cc +++ b/system/stack/test/sdp/stack_sdp_utils_test.cc @@ -49,6 +49,9 @@ #define HFP_PROFILE_MINOR_VERSION_6 0x06 #define HFP_PROFILE_MINOR_VERSION_7 0x07 +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static int L2CA_ConnectReqWithSecurity_cid = 0x42; static RawAddress addr = RawAddress({0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6}); static tSDP_DISCOVERY_DB* sdp_db = nullptr; diff --git a/system/stack/test/stack_rnr_test.cc b/system/stack/test/stack_rnr_test.cc index 0299e1574f..e2b0b3cb73 100644 --- a/system/stack/test/stack_rnr_test.cc +++ b/system/stack/test/stack_rnr_test.cc @@ -27,6 +27,9 @@ #include "test/mock/mock_osi_thread.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + extern tBTM_CB btm_cb; bool ble_evt_type_is_connectable(uint16_t /* evt_type */) { return true; } diff --git a/system/stack/test/stack_smp_test.cc b/system/stack/test/stack_smp_test.cc index cfe0368bcb..31a006d249 100644 --- a/system/stack/test/stack_smp_test.cc +++ b/system/stack/test/stack_smp_test.cc @@ -35,6 +35,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using testing::StrEq; tBTM_CB btm_cb; diff --git a/system/test/common/jni_thread.cc b/system/test/common/jni_thread.cc index ae3e00d7ab..984b2337c1 100644 --- a/system/test/common/jni_thread.cc +++ b/system/test/common/jni_thread.cc @@ -23,6 +23,9 @@ #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + std::queue<base::OnceClosure> do_in_jni_thread_task_queue; void run_one_jni_thread_task() { diff --git a/system/test/common/main_handler.cc b/system/test/common/main_handler.cc index 0849ef37db..8728ab1cd8 100644 --- a/system/test/common/main_handler.cc +++ b/system/test/common/main_handler.cc @@ -29,6 +29,9 @@ #include "include/hardware/bluetooth.h" #include "os/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using bluetooth::common::MessageLoopThread; using BtMainClosure = std::function<void()>; diff --git a/system/test/common/stack_config.cc b/system/test/common/stack_config.cc index 41366496e9..c1bc7e7ae7 100644 --- a/system/test/common/stack_config.cc +++ b/system/test/common/stack_config.cc @@ -22,6 +22,9 @@ #include <cstdarg> #include <cstring> +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + const std::string kSmpOptions("mock smp options"); const std::string kBroadcastAudioConfigOptions("mock broadcast audio config options"); bool get_pts_avrcp_test(void) { return false; } diff --git a/system/test/common/sync_main_handler.cc b/system/test/common/sync_main_handler.cc index 7c59f61a1f..1b6219e761 100644 --- a/system/test/common/sync_main_handler.cc +++ b/system/test/common/sync_main_handler.cc @@ -19,6 +19,9 @@ #include "stack/include/main_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + constexpr int sync_timeout_in_ms = 3000; void sync_main_handler() { diff --git a/system/test/fake/fake_looper.cc b/system/test/fake/fake_looper.cc index 81bcdfb4ee..b7d94dd849 100644 --- a/system/test/fake/fake_looper.cc +++ b/system/test/fake/fake_looper.cc @@ -27,6 +27,9 @@ #include "osi/include/allocator.h" #include "test/fake/fake_thread.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + pid_t get_thread_id() { #if defined(OS_MACOSX) return pthread_mach_thread_np(pthread_self()); diff --git a/system/test/headless/Android.bp b/system/test/headless/Android.bp index f05be39aa6..3349dc607e 100644 --- a/system/test/headless/Android.bp +++ b/system/test/headless/Android.bp @@ -35,9 +35,6 @@ cc_binary { "latest_android_media_audio_common_types_ndk_static", ], cflags: [ - "-Wall", - "-Werror", - "-Wextra", "-Wno-date-time", ], generated_headers: [ diff --git a/system/test/headless/headless.cc b/system/test/headless/headless.cc index 21553a73f7..0ff3155258 100644 --- a/system/test/headless/headless.cc +++ b/system/test/headless/headless.cc @@ -33,6 +33,9 @@ #include "test/headless/messenger.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // // Aggregate disparate variables from callback API into unified single structure // diff --git a/system/test/headless/log.cc b/system/test/headless/log.cc index 6105a9afcf..4714b98c2d 100644 --- a/system/test/headless/log.cc +++ b/system/test/headless/log.cc @@ -24,6 +24,9 @@ #include "internal_include/bt_trace.h" #include "stack/btm/btm_int_types.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + std::chrono::system_clock::time_point _prev = std::chrono::system_clock::now(); extern tBTM_CB btm_cb; diff --git a/system/test/headless/messenger.cc b/system/test/headless/messenger.cc index e8dba380d6..4e84ad1c49 100644 --- a/system/test/headless/messenger.cc +++ b/system/test/headless/messenger.cc @@ -26,6 +26,9 @@ #include "test/headless/interface.h" #include "test/headless/log.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth::test::headless; using namespace std::chrono_literals; diff --git a/system/test/headless/read/name.cc b/system/test/headless/read/name.cc index e1e0940a07..0dc5aa38b7 100644 --- a/system/test/headless/read/name.cc +++ b/system/test/headless/read/name.cc @@ -29,6 +29,9 @@ #include "test/headless/headless.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + std::promise<tBTM_REMOTE_DEV_NAME> promise_; void RemoteNameCallback(const tBTM_REMOTE_DEV_NAME* data) { promise_.set_value(*data); } diff --git a/system/test/headless/util.cc b/system/test/headless/util.cc index df3a15fd0e..8c18a3893f 100644 --- a/system/test/headless/util.cc +++ b/system/test/headless/util.cc @@ -19,6 +19,9 @@ #include "include/hardware/bluetooth.h" #include "osi/include/properties.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool is_android_running() { #ifdef __ANDROID__ char value[PROPERTY_VALUE_MAX]; diff --git a/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc b/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc index 09d095627e..52c9e0eb86 100644 --- a/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc +++ b/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc @@ -32,6 +32,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace audio_hal_interface_a2dp_encoding { diff --git a/system/test/mock/mock_bluetooth_interface.cc b/system/test/mock/mock_bluetooth_interface.cc index 44dfcf279a..0dbe67dadc 100644 --- a/system/test/mock/mock_bluetooth_interface.cc +++ b/system/test/mock/mock_bluetooth_interface.cc @@ -21,6 +21,9 @@ #include "stack/include/bt_octets.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void invoke_adapter_state_changed_cb(bt_state_t /* state */) {} void invoke_adapter_properties_cb(bt_status_t /* status */, int /* num_properties */, bt_property_t* /* properties */) {} diff --git a/system/test/mock/mock_bta_ag_api.cc b/system/test/mock/mock_bta_ag_api.cc index 41138e20a1..f59d2e4ed5 100644 --- a/system/test/mock/mock_bta_ag_api.cc +++ b/system/test/mock/mock_bta_ag_api.cc @@ -30,6 +30,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tBTA_STATUS BTA_AgEnable(tBTA_AG_CBACK* /* p_cback */) { inc_func_call_count(__func__); return BTA_SUCCESS; diff --git a/system/test/mock/mock_bta_ag_sco.cc b/system/test/mock/mock_bta_ag_sco.cc index 09da576c34..b290955c6a 100644 --- a/system/test/mock/mock_bta_ag_sco.cc +++ b/system/test/mock/mock_bta_ag_sco.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Original usings using HfpInterface = bluetooth::audio::hfp::HfpClientInterface; using namespace bluetooth; diff --git a/system/test/mock/mock_bta_ar.cc b/system/test/mock/mock_bta_ar.cc index ff2ec4368c..a75e40fa05 100644 --- a/system/test/mock/mock_bta_ar.cc +++ b/system/test/mock/mock_bta_ar.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void bta_ar_avdt_conn(tBTA_SYS_ID /* sys_id */, const RawAddress& /* bd_addr */, uint8_t /* scb_index */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_bta_av_ci.cc b/system/test/mock/mock_bta_av_ci.cc index 05904cf029..07da047861 100644 --- a/system/test/mock/mock_bta_av_ci.cc +++ b/system/test/mock/mock_bta_av_ci.cc @@ -22,6 +22,9 @@ #include "bta/include/bta_av_api.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void bta_av_ci_setconfig(tBTA_AV_HNDL /* bta_av_handle */, uint8_t /* err_code */, uint8_t /* category */, bool /* recfg_needed */, uint8_t /* avdt_handle */) { diff --git a/system/test/mock/mock_bta_dm_act.cc b/system/test/mock/mock_bta_dm_act.cc index 601b70cacc..243ad3e1fe 100644 --- a/system/test/mock/mock_bta_dm_act.cc +++ b/system/test/mock/mock_bta_dm_act.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_dm_act { diff --git a/system/test/mock/mock_bta_dm_api.cc b/system/test/mock/mock_bta_dm_api.cc index ece4a9d69b..2d8129d0a5 100644 --- a/system/test/mock/mock_bta_dm_api.cc +++ b/system/test/mock/mock_bta_dm_api.cc @@ -32,6 +32,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_dm_api { diff --git a/system/test/mock/mock_bta_dm_main.cc b/system/test/mock/mock_bta_dm_main.cc index 87a441ee6f..4c559cba3c 100644 --- a/system/test/mock/mock_bta_dm_main.cc +++ b/system/test/mock/mock_bta_dm_main.cc @@ -29,6 +29,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_dm_main { diff --git a/system/test/mock/mock_bta_gattc_api.cc b/system/test/mock/mock_bta_gattc_api.cc index 0ea4a4ddc7..1649ce8980 100644 --- a/system/test/mock/mock_bta_gattc_api.cc +++ b/system/test/mock/mock_bta_gattc_api.cc @@ -30,6 +30,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void BTA_GATTC_Disable(void) { inc_func_call_count(__func__); } const gatt::Characteristic* BTA_GATTC_GetCharacteristic(uint16_t /* conn_id */, uint16_t /* handle */) { diff --git a/system/test/mock/mock_bta_gatts_api.cc b/system/test/mock/mock_bta_gatts_api.cc index 1e3e770748..ca13a393c8 100644 --- a/system/test/mock/mock_bta_gatts_api.cc +++ b/system/test/mock/mock_bta_gatts_api.cc @@ -32,6 +32,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void BTA_GATTS_Disable(void) { inc_func_call_count(__func__); } void BTA_GATTS_AppDeregister(tGATT_IF /* server_if */) { inc_func_call_count(__func__); } void BTA_GATTS_AppRegister(const bluetooth::Uuid& /* app_uuid */, tBTA_GATTS_CBACK* /* p_cback */, diff --git a/system/test/mock/mock_bta_hh_utils.cc b/system/test/mock/mock_bta_hh_utils.cc index e45da05966..a922421242 100644 --- a/system/test/mock/mock_bta_hh_utils.cc +++ b/system/test/mock/mock_bta_hh_utils.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_hh_utils { diff --git a/system/test/mock/mock_bta_pan_api.cc b/system/test/mock/mock_bta_pan_api.cc index 4f353f3aa1..0e662c5d19 100644 --- a/system/test/mock/mock_bta_pan_api.cc +++ b/system/test/mock/mock_bta_pan_api.cc @@ -25,6 +25,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void BTA_PanClose(uint16_t /* handle */) { inc_func_call_count(__func__); } void BTA_PanDisable(void) { inc_func_call_count(__func__); } void BTA_PanEnable(tBTA_PAN_CBACK /* p_cback */) { inc_func_call_count(__func__); } diff --git a/system/test/mock/mock_bta_pan_ci.cc b/system/test/mock/mock_bta_pan_ci.cc index 1b75c364a6..ca15b4c33b 100644 --- a/system/test/mock/mock_bta_pan_ci.cc +++ b/system/test/mock/mock_bta_pan_ci.cc @@ -23,6 +23,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + BT_HDR* bta_pan_ci_readbuf(uint16_t /* handle */, RawAddress& /* src */, RawAddress& /* dst */, uint16_t* /* p_protocol */, bool* /* p_ext */, bool* /* p_forward */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_bta_sdp_api.cc b/system/test/mock/mock_bta_sdp_api.cc index 1f5b0159af..966920221a 100644 --- a/system/test/mock/mock_bta_sdp_api.cc +++ b/system/test/mock/mock_bta_sdp_api.cc @@ -28,6 +28,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_sdp_api { diff --git a/system/test/mock/mock_bta_sys_conn.cc b/system/test/mock/mock_bta_sys_conn.cc index 84cf5037dd..e8453047a3 100644 --- a/system/test/mock/mock_bta_sys_conn.cc +++ b/system/test/mock/mock_bta_sys_conn.cc @@ -26,6 +26,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void bta_sys_app_close(tBTA_SYS_ID /* id */, uint8_t /* app_id */, const RawAddress& /* peer_addr */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_bta_sys_main.cc b/system/test/mock/mock_bta_sys_main.cc index 32f5b24c2d..709be46b21 100644 --- a/system/test/mock/mock_bta_sys_main.cc +++ b/system/test/mock/mock_bta_sys_main.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace bta_sys_main { diff --git a/system/test/mock/mock_btif_av.cc b/system/test/mock/mock_btif_av.cc index 966771378f..9b4a706572 100644 --- a/system/test/mock/mock_btif_av.cc +++ b/system/test/mock/mock_btif_av.cc @@ -32,6 +32,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_av { diff --git a/system/test/mock/mock_btif_bluetooth.cc b/system/test/mock/mock_btif_bluetooth.cc index fe77f0789c..c101c6ee4d 100644 --- a/system/test/mock/mock_btif_bluetooth.cc +++ b/system/test/mock/mock_btif_bluetooth.cc @@ -31,6 +31,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_bluetooth { diff --git a/system/test/mock/mock_btif_bqr.cc b/system/test/mock/mock_btif_bqr.cc index b634704373..2a17a7778e 100644 --- a/system/test/mock/mock_btif_bqr.cc +++ b/system/test/mock/mock_btif_bqr.cc @@ -23,6 +23,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace bqr { diff --git a/system/test/mock/mock_btif_bta_pan_co_rx.cc b/system/test/mock/mock_btif_bta_pan_co_rx.cc index d1df05d8e1..741104b228 100644 --- a/system/test/mock/mock_btif_bta_pan_co_rx.cc +++ b/system/test/mock/mock_btif_bta_pan_co_rx.cc @@ -30,6 +30,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_bta_pan_co_rx { diff --git a/system/test/mock/mock_btif_co_bta_av_co.cc b/system/test/mock/mock_btif_co_bta_av_co.cc index 2c7f9f39fe..efa055531f 100644 --- a/system/test/mock/mock_btif_co_bta_av_co.cc +++ b/system/test/mock/mock_btif_co_bta_av_co.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_co_bta_av_co { diff --git a/system/test/mock/mock_btif_co_bta_dm_co.cc b/system/test/mock/mock_btif_co_bta_dm_co.cc index d2e4244b07..656b94cda2 100644 --- a/system/test/mock/mock_btif_co_bta_dm_co.cc +++ b/system/test/mock/mock_btif_co_bta_dm_co.cc @@ -24,6 +24,9 @@ #include "bta/sys/bta_sys.h" #include "internal_include/bte_appl.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tBTE_APPL_CFG bte_appl_cfg = {BTA_LE_AUTH_REQ_SC_MITM_BOND, // Authentication requirements BTM_IO_CAP_UNKNOWN, BTM_BLE_INITIATOR_KEY_SIZE, BTM_BLE_RESPONDER_KEY_SIZE, BTM_BLE_MAX_KEY_SIZE}; diff --git a/system/test/mock/mock_btif_co_bta_hh_co.cc b/system/test/mock/mock_btif_co_bta_hh_co.cc index 9ea3994b52..788317f56c 100644 --- a/system/test/mock/mock_btif_co_bta_hh_co.cc +++ b/system/test/mock/mock_btif_co_bta_hh_co.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + int bta_hh_co_write(int /* fd */, uint8_t* /* rpt */, uint16_t /* len */) { inc_func_call_count(__func__); return 0; diff --git a/system/test/mock/mock_btif_config.cc b/system/test/mock/mock_btif_config.cc index 1d8bafa8cb..549fe4bf44 100644 --- a/system/test/mock/mock_btif_config.cc +++ b/system/test/mock/mock_btif_config.cc @@ -33,6 +33,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_config { diff --git a/system/test/mock/mock_btif_core.cc b/system/test/mock/mock_btif_core.cc index faf2289078..001c5b553f 100644 --- a/system/test/mock/mock_btif_core.cc +++ b/system/test/mock/mock_btif_core.cc @@ -29,6 +29,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btif_is_dut_mode() { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_btif_dm.cc b/system/test/mock/mock_btif_dm.cc index 0f6698d3a2..f4baf57ea1 100644 --- a/system/test/mock/mock_btif_dm.cc +++ b/system/test/mock/mock_btif_dm.cc @@ -31,6 +31,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + struct uid_set_t; bool btif_dm_pairing_is_busy() { diff --git a/system/test/mock/mock_btif_hf.cc b/system/test/mock/mock_btif_hf.cc index e49f8f09fc..3004d4a97e 100644 --- a/system/test/mock/mock_btif_hf.cc +++ b/system/test/mock/mock_btif_hf.cc @@ -29,6 +29,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_hf { diff --git a/system/test/mock/mock_btif_profile_storage.cc b/system/test/mock/mock_btif_profile_storage.cc index 8658ab740b..a89422a7ee 100644 --- a/system/test/mock/mock_btif_profile_storage.cc +++ b/system/test/mock/mock_btif_profile_storage.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Original usings using bluetooth::Uuid; diff --git a/system/test/mock/mock_btif_sock_rfc.cc b/system/test/mock/mock_btif_sock_rfc.cc index 5ab162a470..49b5b117fa 100644 --- a/system/test/mock/mock_btif_sock_rfc.cc +++ b/system/test/mock/mock_btif_sock_rfc.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Original usings using bluetooth::Uuid; diff --git a/system/test/mock/mock_btif_stack_manager.cc b/system/test/mock/mock_btif_stack_manager.cc index 77a8730345..bdc4150ca9 100644 --- a/system/test/mock/mock_btif_stack_manager.cc +++ b/system/test/mock/mock_btif_stack_manager.cc @@ -22,6 +22,9 @@ #include "osi/include/future.h" #include "test/common/core_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + static future_t* hack_future; future_t* stack_manager_get_hack_future() { return hack_future; } diff --git a/system/test/mock/mock_btif_storage.cc b/system/test/mock/mock_btif_storage.cc index f0990f6022..1f327eeb16 100644 --- a/system/test/mock/mock_btif_storage.cc +++ b/system/test/mock/mock_btif_storage.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Original usings using bluetooth::Uuid; diff --git a/system/test/mock/mock_btif_util.cc b/system/test/mock/mock_btif_util.cc index f361608b20..662fa3fcbc 100644 --- a/system/test/mock/mock_btif_util.cc +++ b/system/test/mock/mock_btif_util.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace btif_util { diff --git a/system/test/mock/mock_btu_task.cc b/system/test/mock/mock_btu_task.cc index 5c3cf08a8d..bf5bf2a314 100644 --- a/system/test/mock/mock_btu_task.cc +++ b/system/test/mock/mock_btu_task.cc @@ -22,4 +22,7 @@ #include "stack/include/bt_hdr.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void btu_hci_msg_process(BT_HDR* /* p_msg */) { inc_func_call_count(__func__); } diff --git a/system/test/mock/mock_device_esco_parameters.cc b/system/test/mock/mock_device_esco_parameters.cc index 311daf7f0b..5a9a3ad263 100644 --- a/system/test/mock/mock_device_esco_parameters.cc +++ b/system/test/mock/mock_device_esco_parameters.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace device_esco_parameters { diff --git a/system/test/mock/mock_device_interop.cc b/system/test/mock/mock_device_interop.cc index 4f98781b23..0f7a0a27e5 100644 --- a/system/test/mock/mock_device_interop.cc +++ b/system/test/mock/mock_device_interop.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace device_interop { diff --git a/system/test/mock/mock_device_iot_config.cc b/system/test/mock/mock_device_iot_config.cc index 6188e58c8d..61308a883a 100644 --- a/system/test/mock/mock_device_iot_config.cc +++ b/system/test/mock/mock_device_iot_config.cc @@ -21,6 +21,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace device_iot_config { diff --git a/system/test/mock/mock_jni_thread.cc b/system/test/mock/mock_jni_thread.cc index 29af8f640c..eb8b6db093 100644 --- a/system/test/mock/mock_jni_thread.cc +++ b/system/test/mock/mock_jni_thread.cc @@ -28,6 +28,9 @@ #include "test/common/jni_thread.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool is_on_jni_thread() { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_main_shim_acl.cc b/system/test/mock/mock_main_shim_acl.cc index 9db83b7ff4..2c11004ba2 100644 --- a/system/test/mock/mock_main_shim_acl.cc +++ b/system/test/mock/mock_main_shim_acl.cc @@ -33,6 +33,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; void DumpsysL2cap(int /* fd */) { inc_func_call_count(__func__); } diff --git a/system/test/mock/mock_main_shim_acl_interface.cc b/system/test/mock/mock_main_shim_acl_interface.cc index 56075efa58..2ba6014443 100644 --- a/system/test/mock/mock_main_shim_acl_interface.cc +++ b/system/test/mock/mock_main_shim_acl_interface.cc @@ -16,6 +16,9 @@ #include "main/shim/acl_interface.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth { namespace shim { namespace legacy { diff --git a/system/test/mock/mock_main_shim_hci_layer.cc b/system/test/mock/mock_main_shim_hci_layer.cc index d9c715d380..c02f009333 100644 --- a/system/test/mock/mock_main_shim_hci_layer.cc +++ b/system/test/mock/mock_main_shim_hci_layer.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace bluetooth::shim { namespace testing { const hci_t* test_interface = nullptr; diff --git a/system/test/mock/mock_osi_future.cc b/system/test/mock/mock_osi_future.cc index 4a6122a105..c7c98a3ac7 100644 --- a/system/test/mock/mock_osi_future.cc +++ b/system/test/mock/mock_osi_future.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_future { diff --git a/system/test/mock/mock_osi_list.cc b/system/test/mock/mock_osi_list.cc index bed9c04287..2aa2bfd462 100644 --- a/system/test/mock/mock_osi_list.cc +++ b/system/test/mock/mock_osi_list.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_list { diff --git a/system/test/mock/mock_osi_mutex.cc b/system/test/mock/mock_osi_mutex.cc index 25fb8de3cf..ff8aa0afb2 100644 --- a/system/test/mock/mock_osi_mutex.cc +++ b/system/test/mock/mock_osi_mutex.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_mutex { diff --git a/system/test/mock/mock_osi_properties.cc b/system/test/mock/mock_osi_properties.cc index cc2231125d..f22b3e0e1d 100644 --- a/system/test/mock/mock_osi_properties.cc +++ b/system/test/mock/mock_osi_properties.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_properties { diff --git a/system/test/mock/mock_osi_socket.cc b/system/test/mock/mock_osi_socket.cc index 6fecb157e4..7daa32c5e2 100644 --- a/system/test/mock/mock_osi_socket.cc +++ b/system/test/mock/mock_osi_socket.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_socket { diff --git a/system/test/mock/mock_osi_thread_scheduler.cc b/system/test/mock/mock_osi_thread_scheduler.cc index ff978b2b4d..a248efc327 100644 --- a/system/test/mock/mock_osi_thread_scheduler.cc +++ b/system/test/mock/mock_osi_thread_scheduler.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_thread_scheduler { diff --git a/system/test/mock/mock_osi_wakelock.cc b/system/test/mock/mock_osi_wakelock.cc index 03cb33a2f4..b2805a7cba 100644 --- a/system/test/mock/mock_osi_wakelock.cc +++ b/system/test/mock/mock_osi_wakelock.cc @@ -27,6 +27,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace osi_wakelock { diff --git a/system/test/mock/mock_stack_a2dp_sbc.cc b/system/test/mock/mock_stack_a2dp_sbc.cc index d612278939..7423ae79cb 100644 --- a/system/test/mock/mock_stack_a2dp_sbc.cc +++ b/system/test/mock/mock_stack_a2dp_sbc.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_a2dp_sbc { diff --git a/system/test/mock/mock_stack_acl.cc b/system/test/mock/mock_stack_acl.cc index 89ad3da5f0..22822f2f89 100644 --- a/system/test/mock/mock_stack_acl.cc +++ b/system/test/mock/mock_stack_acl.cc @@ -35,6 +35,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_acl { diff --git a/system/test/mock/mock_stack_acl_ble.cc b/system/test/mock/mock_stack_acl_ble.cc index c073b50aa5..e403a923e3 100644 --- a/system/test/mock/mock_stack_acl_ble.cc +++ b/system/test/mock/mock_stack_acl_ble.cc @@ -27,6 +27,9 @@ #include "types/hci_role.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void acl_ble_connection_fail(const tBLE_BD_ADDR& /* address_with_type */, uint16_t /* handle */, bool /* enhanced */, tHCI_STATUS /* status */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_acl_btm_pm.cc b/system/test/mock/mock_stack_acl_btm_pm.cc index f57dbf641c..8ae9f01c63 100644 --- a/system/test/mock/mock_stack_acl_btm_pm.cc +++ b/system/test/mock/mock_stack_acl_btm_pm.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool BTM_ReadPowerMode(const RawAddress& /* remote_bda */, tBTM_PM_MODE* /* p_mode */) { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_stack_avrc_api.cc b/system/test/mock/mock_stack_avrc_api.cc index a3fa3c7c57..5409f75345 100644 --- a/system/test/mock/mock_stack_avrc_api.cc +++ b/system/test/mock/mock_stack_avrc_api.cc @@ -25,6 +25,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool avrcp_absolute_volume_is_enabled() { inc_func_call_count(__func__); return true; diff --git a/system/test/mock/mock_stack_avrc_apt.cc b/system/test/mock/mock_stack_avrc_apt.cc index 7b3cead167..2380d1756e 100644 --- a/system/test/mock/mock_stack_avrc_apt.cc +++ b/system/test/mock/mock_stack_avrc_apt.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_avrc_apt { diff --git a/system/test/mock/mock_stack_avrc_bld_tg.cc b/system/test/mock/mock_stack_avrc_bld_tg.cc index c060df0d22..6a1f126edd 100644 --- a/system/test/mock/mock_stack_avrc_bld_tg.cc +++ b/system/test/mock/mock_stack_avrc_bld_tg.cc @@ -24,6 +24,9 @@ #include "stack/include/bt_hdr.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tAVRC_STS AVRC_BldResponse(uint8_t /* handle */, tAVRC_RESPONSE* /* p_rsp */, BT_HDR** /* pp_pkt */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_avrc_pars.ct.cc b/system/test/mock/mock_stack_avrc_pars.ct.cc index 7635d79637..511231e11d 100644 --- a/system/test/mock/mock_stack_avrc_pars.ct.cc +++ b/system/test/mock/mock_stack_avrc_pars.ct.cc @@ -23,6 +23,9 @@ #include "avrc_defs.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tAVRC_STS AVRC_Ctrl_ParsResponse(tAVRC_MSG* /* p_msg */, tAVRC_RESPONSE* /* p_result */, uint8_t* /* p_buf */, uint16_t* /* buf_len */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_avrc_utils.cc b/system/test/mock/mock_stack_avrc_utils.cc index 78a37cbeb2..b4eca59731 100644 --- a/system/test/mock/mock_stack_avrc_utils.cc +++ b/system/test/mock/mock_stack_avrc_utils.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_avrc_utils { diff --git a/system/test/mock/mock_stack_btm_ble.cc b/system/test/mock/mock_stack_btm_ble.cc index 71137f0a20..7e1a2154b9 100644 --- a/system/test/mock/mock_stack_btm_ble.cc +++ b/system/test/mock/mock_stack_btm_ble.cc @@ -33,6 +33,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_ble { @@ -302,3 +305,7 @@ void read_phy_cb(base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t sta // END mockcify generation std::optional<Octet16> BTM_BleGetPeerLTK(const RawAddress /* address */) { return std::nullopt; } + +std::optional<tBLE_BD_ADDR> BTM_BleGetIdentityAddress(const RawAddress /* address */) { + return std::nullopt; +} diff --git a/system/test/mock/mock_stack_btm_ble.h b/system/test/mock/mock_stack_btm_ble.h index 7d5013b859..1133b60b4c 100644 --- a/system/test/mock/mock_stack_btm_ble.h +++ b/system/test/mock/mock_stack_btm_ble.h @@ -575,8 +575,4 @@ extern struct read_phy_cb read_phy_cb; } // namespace mock } // namespace test -std::optional<tBLE_BD_ADDR> BTM_BleGetIdentityAddress(const RawAddress /* address */) { - return std::nullopt; -} - // END mockcify generation diff --git a/system/test/mock/mock_stack_btm_ble_addr.cc b/system/test/mock/mock_stack_btm_ble_addr.cc index d2b841f6de..2a52fb57ea 100644 --- a/system/test/mock/mock_stack_btm_ble_addr.cc +++ b/system/test/mock/mock_stack_btm_ble_addr.cc @@ -32,6 +32,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_ble_addr { diff --git a/system/test/mock/mock_stack_btm_ble_bgconn.cc b/system/test/mock/mock_stack_btm_ble_bgconn.cc index afdab209f8..2d14a1a5b6 100644 --- a/system/test/mock/mock_stack_btm_ble_bgconn.cc +++ b/system/test/mock/mock_stack_btm_ble_bgconn.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Mocked compile conditionals, if any // Mocked internal structures, if any struct BackgroundConnection {}; diff --git a/system/test/mock/mock_stack_btm_ble_gap.cc b/system/test/mock/mock_stack_btm_ble_gap.cc index 444093a5e6..93e134c4a8 100644 --- a/system/test/mock/mock_stack_btm_ble_gap.cc +++ b/system/test/mock/mock_stack_btm_ble_gap.cc @@ -34,6 +34,9 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using StartSyncCb = base::Callback<void( uint8_t /*status*/, uint16_t /*sync_handle*/, uint8_t /*advertising_sid*/, uint8_t /*address_type*/, RawAddress /*address*/, uint8_t /*phy*/, uint16_t /*interval*/)>; diff --git a/system/test/mock/mock_stack_btm_ble_privacy.cc b/system/test/mock/mock_stack_btm_ble_privacy.cc index f4cb9929f0..7781d9cc75 100644 --- a/system/test/mock/mock_stack_btm_ble_privacy.cc +++ b/system/test/mock/mock_stack_btm_ble_privacy.cc @@ -30,6 +30,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_ble_privacy { diff --git a/system/test/mock/mock_stack_btm_dev.cc b/system/test/mock/mock_stack_btm_dev.cc index d14b67113d..1dc2da8646 100644 --- a/system/test/mock/mock_stack_btm_dev.cc +++ b/system/test/mock/mock_stack_btm_dev.cc @@ -32,6 +32,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_dev { diff --git a/system/test/mock/mock_stack_btm_devctl.cc b/system/test/mock/mock_stack_btm_devctl.cc index f50ee83396..fc27fab6db 100644 --- a/system/test/mock/mock_stack_btm_devctl.cc +++ b/system/test/mock/mock_stack_btm_devctl.cc @@ -29,6 +29,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_devctl { diff --git a/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc b/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc index 49056eb490..d2ed992484 100644 --- a/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc +++ b/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc @@ -32,6 +32,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_hfp_lc3_encoder { diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc index a2597e8455..dea537f621 100644 --- a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc +++ b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc @@ -30,6 +30,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_hfp_msbc_decoder { diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc index 219578455b..3c38e66754 100644 --- a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc +++ b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc @@ -33,6 +33,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_hfp_msbc_encoder { diff --git a/system/test/mock/mock_stack_btm_inq.cc b/system/test/mock/mock_stack_btm_inq.cc index 82fd00d2b1..b137827eb9 100644 --- a/system/test/mock/mock_stack_btm_inq.cc +++ b/system/test/mock/mock_stack_btm_inq.cc @@ -31,6 +31,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_inq { diff --git a/system/test/mock/mock_stack_btm_interface.cc b/system/test/mock/mock_stack_btm_interface.cc index 5f5004428e..7016d4b662 100644 --- a/system/test/mock/mock_stack_btm_interface.cc +++ b/system/test/mock/mock_stack_btm_interface.cc @@ -26,6 +26,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Test accessible feature page uint8_t hci_feature_bytes_per_page[HCI_FEATURE_BYTES_PER_PAGE] = {}; diff --git a/system/test/mock/mock_stack_btm_main.cc b/system/test/mock/mock_stack_btm_main.cc index 75fb6ca400..e188d0d89c 100644 --- a/system/test/mock/mock_stack_btm_main.cc +++ b/system/test/mock/mock_stack_btm_main.cc @@ -25,6 +25,9 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void BTM_LogHistory(const std::string& /* tag */, const RawAddress& /* bd_addr */, const std::string& /* msg */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_btm_sco.cc b/system/test/mock/mock_stack_btm_sco.cc index aa71749603..949e635b09 100644 --- a/system/test/mock/mock_stack_btm_sco.cc +++ b/system/test/mock/mock_stack_btm_sco.cc @@ -30,6 +30,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool btm_sco_removed(uint16_t /* hci_handle */, tHCI_REASON /* reason */) { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_stack_btm_sec.cc b/system/test/mock/mock_stack_btm_sec.cc index 4be4fe51cb..2bfd288187 100644 --- a/system/test/mock/mock_stack_btm_sec.cc +++ b/system/test/mock/mock_stack_btm_sec.cc @@ -34,6 +34,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_btm_sec { diff --git a/system/test/mock/mock_stack_btu_hcif.cc b/system/test/mock/mock_stack_btu_hcif.cc index 90ea7db641..4fecd7bcc2 100644 --- a/system/test/mock/mock_stack_btu_hcif.cc +++ b/system/test/mock/mock_stack_btu_hcif.cc @@ -28,6 +28,9 @@ #include "stack/include/btu_hcif.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using hci_cmd_cb = base::OnceCallback<void(uint8_t* /* return_parameters */, uint16_t /* return_parameters_length*/)>; diff --git a/system/test/mock/mock_stack_gap_ble.cc b/system/test/mock/mock_stack_gap_ble.cc index e07b77b1d3..941ca7d187 100644 --- a/system/test/mock/mock_stack_gap_ble.cc +++ b/system/test/mock/mock_stack_gap_ble.cc @@ -25,6 +25,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool GAP_BleCancelReadPeerDevName(const RawAddress& /* peer_bda */) { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_stack_gap_conn.cc b/system/test/mock/mock_stack_gap_conn.cc index 0ef505d14a..6fb9826588 100644 --- a/system/test/mock/mock_stack_gap_conn.cc +++ b/system/test/mock/mock_stack_gap_conn.cc @@ -24,6 +24,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + const RawAddress* GAP_ConnGetRemoteAddr(uint16_t /* gap_handle */) { inc_func_call_count(__func__); return nullptr; diff --git a/system/test/mock/mock_stack_gatt.cc b/system/test/mock/mock_stack_gatt.cc index 9e66fc1700..297ec5747a 100644 --- a/system/test/mock/mock_stack_gatt.cc +++ b/system/test/mock/mock_stack_gatt.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/bluetooth/uuid.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; tGATT_HDL_LIST_ELEM elem; // gatt_add_an_item_to_list diff --git a/system/test/mock/mock_stack_gatt_api.cc b/system/test/mock/mock_stack_gatt_api.cc index 9ad7f8786b..947cc1a728 100644 --- a/system/test/mock/mock_stack_gatt_api.cc +++ b/system/test/mock/mock_stack_gatt_api.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + // Original usings using bluetooth::Uuid; diff --git a/system/test/mock/mock_stack_gatt_attr.cc b/system/test/mock/mock_stack_gatt_attr.cc index a1dd9a5103..6de9539644 100644 --- a/system/test/mock/mock_stack_gatt_attr.cc +++ b/system/test/mock/mock_stack_gatt_attr.cc @@ -28,6 +28,9 @@ #include "types/bt_transport.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + uint16_t gatt_profile_find_conn_id_by_bd_addr(const RawAddress& /* remote_bda */) { inc_func_call_count(__func__); return 0; diff --git a/system/test/mock/mock_stack_gatt_auth.cc b/system/test/mock/mock_stack_gatt_auth.cc index e676da43fd..1e59e8152d 100644 --- a/system/test/mock/mock_stack_gatt_auth.cc +++ b/system/test/mock/mock_stack_gatt_auth.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool gatt_security_check_start(tGATT_CLCB* /* p_clcb */) { inc_func_call_count(__func__); return false; diff --git a/system/test/mock/mock_stack_gatt_main.cc b/system/test/mock/mock_stack_gatt_main.cc index 66cb4a5844..8ef0677c49 100644 --- a/system/test/mock/mock_stack_gatt_main.cc +++ b/system/test/mock/mock_stack_gatt_main.cc @@ -25,6 +25,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void gatt_init(void) { inc_func_call_count(__func__); } bool gatt_act_connect(tGATT_REG* /* p_reg */, const RawAddress& /* bd_addr */, tBLE_ADDR_TYPE /* addr_type */, tBT_TRANSPORT /* transport */, diff --git a/system/test/mock/mock_stack_hcic_hciblecmds.cc b/system/test/mock/mock_stack_hcic_hciblecmds.cc index 354d4c151f..b44bbff0a4 100644 --- a/system/test/mock/mock_stack_hcic_hciblecmds.cc +++ b/system/test/mock/mock_stack_hcic_hciblecmds.cc @@ -28,6 +28,9 @@ // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_hcic_hciblecmds { diff --git a/system/test/mock/mock_stack_hidh.cc b/system/test/mock/mock_stack_hidh.cc index c3ab99f969..15b16a4ae8 100644 --- a/system/test/mock/mock_stack_hidh.cc +++ b/system/test/mock/mock_stack_hidh.cc @@ -27,6 +27,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tHID_STATUS HID_HostAddDev(const RawAddress& /* addr */, uint16_t /* attr_mask */, uint8_t* /* handle */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_l2cap_api.cc b/system/test/mock/mock_stack_l2cap_api.cc index 1fec5442f5..c360878a6b 100644 --- a/system/test/mock/mock_stack_l2cap_api.cc +++ b/system/test/mock/mock_stack_l2cap_api.cc @@ -29,6 +29,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_l2cap_api { diff --git a/system/test/mock/mock_stack_l2cap_ble.cc b/system/test/mock/mock_stack_l2cap_ble.cc index 9c25b6f348..ee62576516 100644 --- a/system/test/mock/mock_stack_l2cap_ble.cc +++ b/system/test/mock/mock_stack_l2cap_ble.cc @@ -31,6 +31,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_l2cap_ble { diff --git a/system/test/mock/mock_stack_l2cap_link.cc b/system/test/mock/mock_stack_l2cap_link.cc index cc05d9a566..c0dea8c1fc 100644 --- a/system/test/mock/mock_stack_l2cap_link.cc +++ b/system/test/mock/mock_stack_l2cap_link.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* /* p_lcb */) { inc_func_call_count(__func__); return nullptr; diff --git a/system/test/mock/mock_stack_l2cap_main.cc b/system/test/mock/mock_stack_l2cap_main.cc index fb33fed8f8..606551fb98 100644 --- a/system/test/mock/mock_stack_l2cap_main.cc +++ b/system/test/mock/mock_stack_l2cap_main.cc @@ -23,6 +23,9 @@ #include "stack/l2cap/l2c_int.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tL2CAP_DW_RESULT l2c_data_write(uint16_t /* cid */, BT_HDR* /* p_data */, uint16_t /* flags */) { inc_func_call_count(__func__); return tL2CAP_DW_RESULT::FAILED; diff --git a/system/test/mock/mock_stack_l2cap_utils.cc b/system/test/mock/mock_stack_l2cap_utils.cc index 1838912b01..accdc72881 100644 --- a/system/test/mock/mock_stack_l2cap_utils.cc +++ b/system/test/mock/mock_stack_l2cap_utils.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + BT_HDR* l2cu_build_header(tL2C_LCB* /* p_lcb */, uint16_t /* len */, uint8_t /* cmd */, uint8_t /* signal_id */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_metrics_logging.cc b/system/test/mock/mock_stack_metrics_logging.cc index 6c21688de2..7b1e54c191 100644 --- a/system/test/mock/mock_stack_metrics_logging.cc +++ b/system/test/mock/mock_stack_metrics_logging.cc @@ -35,6 +35,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_metrics_logging { diff --git a/system/test/mock/mock_stack_sdp_api.cc b/system/test/mock/mock_stack_sdp_api.cc index 65db618c1c..8ae3af4762 100644 --- a/system/test/mock/mock_stack_sdp_api.cc +++ b/system/test/mock/mock_stack_sdp_api.cc @@ -32,6 +32,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_sdp_api { diff --git a/system/test/mock/mock_stack_sdp_db.cc b/system/test/mock/mock_stack_sdp_db.cc index 91ddae982c..57c4db280d 100644 --- a/system/test/mock/mock_stack_sdp_db.cc +++ b/system/test/mock/mock_stack_sdp_db.cc @@ -22,6 +22,9 @@ #include "stack/sdp/sdpint.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool SDP_AddAdditionProtoLists(uint32_t /* handle */, uint16_t /* num_elem */, tSDP_PROTO_LIST_ELEM* /* p_proto_list */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_stack_sdp_main.cc b/system/test/mock/mock_stack_sdp_main.cc index e66b58bbd0..751daba254 100644 --- a/system/test/mock/mock_stack_sdp_main.cc +++ b/system/test/mock/mock_stack_sdp_main.cc @@ -23,6 +23,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + tCONN_CB* sdp_conn_originate(const RawAddress& /* p_bd_addr */) { inc_func_call_count(__func__); return nullptr; diff --git a/system/test/mock/mock_stack_sdp_server.cc b/system/test/mock/mock_stack_sdp_server.cc index 21e61901bd..6802bc4d6e 100644 --- a/system/test/mock/mock_stack_sdp_server.cc +++ b/system/test/mock/mock_stack_sdp_server.cc @@ -17,6 +17,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + void update_pce_entry_to_interop_database(RawAddress /* remote_addr */) { inc_func_call_count(__func__); } diff --git a/system/test/mock/mock_stack_security_client_interface.cc b/system/test/mock/mock_stack_security_client_interface.cc index d7dfeb2817..5ccb5e31df 100644 --- a/system/test/mock/mock_stack_security_client_interface.cc +++ b/system/test/mock/mock_stack_security_client_interface.cc @@ -19,6 +19,9 @@ #include "stack/include/security_client_callbacks.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace { // Initialize the working btm client interface to the default diff --git a/system/test/mock/mock_stack_smp_act.cc b/system/test/mock/mock_stack_smp_act.cc index 8f02fa14b2..486cf5dea7 100644 --- a/system/test/mock/mock_stack_smp_act.cc +++ b/system/test/mock/mock_stack_smp_act.cc @@ -32,6 +32,9 @@ // Mocked compile conditionals, if any // Mocked internal structures, if any +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + namespace test { namespace mock { namespace stack_smp_act { diff --git a/system/test/mock/mock_stack_srvc_dis.cc b/system/test/mock/mock_stack_srvc_dis.cc index 365ff059eb..abd467c3a9 100644 --- a/system/test/mock/mock_stack_srvc_dis.cc +++ b/system/test/mock/mock_stack_srvc_dis.cc @@ -26,6 +26,9 @@ #include "test/common/mock_functions.h" #include "types/raw_address.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + bool DIS_ReadDISInfo(const RawAddress& /* peer_bda */, tDIS_READ_CBACK* /* p_cback */, tDIS_ATTR_MASK /* mask */) { inc_func_call_count(__func__); diff --git a/system/test/mock/mock_udrv_ulinux_uipc.cc b/system/test/mock/mock_udrv_ulinux_uipc.cc index cc6d354be3..daa7cc7f7c 100644 --- a/system/test/mock/mock_udrv_ulinux_uipc.cc +++ b/system/test/mock/mock_udrv_ulinux_uipc.cc @@ -24,6 +24,9 @@ #include "test/common/mock_functions.h" #include "udrv/include/uipc.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + std::unique_ptr<tUIPC_STATE> mock_uipc_init_ret; uint32_t mock_uipc_read_ret; bool mock_uipc_send_ret; diff --git a/system/test/stub/osi.cc b/system/test/stub/osi.cc index e41965e7f6..cae495f2ca 100644 --- a/system/test/stub/osi.cc +++ b/system/test/stub/osi.cc @@ -42,6 +42,9 @@ #include "test/common/fake_osi.h" #include "test/common/mock_functions.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + OsiObject::OsiObject(void* ptr) : ptr_(ptr) {} OsiObject::OsiObject(const void* ptr) : ptr_(const_cast<void*>(ptr)) {} diff --git a/system/udrv/ulinux/uipc.cc b/system/udrv/ulinux/uipc.cc index e90fe9a22a..464e02b7f1 100644 --- a/system/udrv/ulinux/uipc.cc +++ b/system/udrv/ulinux/uipc.cc @@ -48,6 +48,9 @@ #include "osi/include/osi.h" #include "osi/include/socket_utils/sockets.h" +// TODO(b/369381361) Enfore -Wmissing-prototypes +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + using namespace bluetooth; /***************************************************************************** |