From b7d06d5f772f8a22d5f098893b64da61f87670f8 Mon Sep 17 00:00:00 2001 From: tzik Date: Sat, 20 Feb 2016 00:21:28 -0800 Subject: 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} --- extensions/browser/api/bluetooth_socket/bluetooth_api_socket.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extensions/browser') 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; -- cgit v1.1