OSDN Git Service

[system][bt] fix -Wdangling-gsl
authorNick Desaulniers <ndesaulniers@google.com>
Thu, 10 Oct 2019 21:04:47 +0000 (14:04 -0700)
committerHansong Zhang <hsz@google.com>
Mon, 14 Oct 2019 21:21:46 +0000 (14:21 -0700)
commit20ed45d6339079645ef9fe576b894e9497684c93
tree6e403fc4acdd4b8523e6e452b6bebe38b7560196
parent10e15ee4610969b10e7558969fed8ba229d8e5a0
[system][bt] fix -Wdangling-gsl

BtAddrString() returns a std::string. It's not safe to chain a call to
c_str() as otherwise the returned std::string is a temporary, and the
expression evaluates to an immediately dangling pointer.

Bug: 139945549
Bug: 142558228
Test: mm
Change-Id: I30972458abcc563b24ee0d80b289c3efd6c3e04d
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
service/low_energy_client.cc