diff options
author | tzik <tzik@chromium.org> | 2016-02-20 00:21:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-20 08:22:19 +0000 |
commit | b7d06d5f772f8a22d5f098893b64da61f87670f8 (patch) | |
tree | f3fcad4045e2d6268ee19f3720d13de30d1b454a /extensions/browser/api | |
parent | 4c8da94602727332cb62cf9544af8bd53dac753f (diff) | |
download | chromium_src-b7d06d5f772f8a22d5f098893b64da61f87670f8.zip chromium_src-b7d06d5f772f8a22d5f098893b64da61f87670f8.tar.gz chromium_src-b7d06d5f772f8a22d5f098893b64da61f87670f8.tar.bz2 |
Assign a initial value to local variables to avoid maybe-uninitialized warning
gcc and cl.exe start warning on a switch-case pattern for
possibly uninitialized local variable with a base::Callback::Run
signature modification.
This CL assigns initial values to avoid it.
Review URL: https://codereview.chromium.org/1704873002
Cr-Commit-Position: refs/heads/master@{#376641}
Diffstat (limited to 'extensions/browser/api')
-rw-r--r-- | extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc b/extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc index 9bee22d..c1a400463 100644 --- a/extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc +++ b/extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc @@ -129,7 +129,8 @@ void BluetoothApiSocket::OnSocketReceiveError( device::BluetoothSocket::ErrorReason reason, const std::string& message) { DCHECK_CURRENTLY_ON(kThreadId); - BluetoothApiSocket::ErrorReason error_reason; + BluetoothApiSocket::ErrorReason error_reason = + BluetoothApiSocket::kSystemError; switch (reason) { case device::BluetoothSocket::kIOPending: error_reason = BluetoothApiSocket::kIOPending; |