OSDN Git Service

Fix BTM callbacks so callee and caller types match
authorVishwath Mohan <vishwath@google.com>
Thu, 9 Nov 2017 06:45:47 +0000 (22:45 -0800)
committerVishwath Mohan <vishwath@google.com>
Thu, 9 Nov 2017 07:18:15 +0000 (23:18 -0800)
commit325abcfa4a039aa6cb0c7a350c11daacd3cc9b62
treee0119a8c7a9954dde2142081de3fb83ea206d162
parenteb993d97b70115d99e2bf45c627aae151131b3d9
Fix BTM callbacks so callee and caller types match

This CL fixes inconsistencies between the actual type of a callback
function, and the type assumed at the call site. This respects the
intended function signature.

For P, we plan to enable control-flow integrity (CFI) across multiple
platform components, including BT. This mismatch will break CFI and
cause runtime errors when enabled - so this is also a preemptive
measure to get BT compatible in preparation.

Bug: 30227045
Test: Builds and runs without errors when CFI is enabled.
Change-Id: I8970e6866d8b37a9adf5e040db993d30f1b5103a
bta/dm/bta_dm_act.cc
stack/btm/btm_devctl.cc
stack/btm/btm_int.h
stack/btu/btu_hcif.cc