From 5bc5c34d2ea47e2642519bed458cb08bd9885a23 Mon Sep 17 00:00:00 2001 From: James Donald Date: Fri, 27 Sep 2019 15:45:20 -0700 Subject: [PATCH] Remove unused variable in catch(...) expressions Summary: D17629896 was intended to fix this in ovrsource, but it turns out these changes should be made on fbsource first then get synced. The MSVC build of OculusPCSDK has numerous warnings, including these low-hanging fruit: ``` c:\open\ovrsource\xplat\omnistore\client\common\reportsubscriptionstatetiming.cpp(28): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\databaseanalyticsmetadatatiming.cpp(23): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\sendqueuereportbacklogtiming.cpp(32): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\omnistore.cpp(192): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\omnistore.cpp(907): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\omnistore.cpp(934): warning C4101: 'e': unreferenced local variable c:\open\ovrsource\xplat\omnistore\client\common\omnistore.cpp(946): warning C4101: 'e': unreferenced local variable ``` Clang doesn't complain, but the code is just as clear without the 'e' so best to remove. Reviewed By: vener91 Differential Revision: D17631747 fbshipit-source-id: 0190a48e640311b40c9d1b988b0c07cfbdcfd7e5 --- xplat/Flipper/ConnectionContextStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xplat/Flipper/ConnectionContextStore.cpp b/xplat/Flipper/ConnectionContextStore.cpp index 656aa08c4..dd2fd357c 100644 --- a/xplat/Flipper/ConnectionContextStore.cpp +++ b/xplat/Flipper/ConnectionContextStore.cpp @@ -85,7 +85,7 @@ std::string ConnectionContextStore::getDeviceId() { auto maybeDeviceId = folly::parseJson(config)["deviceId"]; return maybeDeviceId.isString() ? maybeDeviceId.getString() : deviceData_.deviceId; - } catch (std::exception& e) { + } catch (std::exception&) { return deviceData_.deviceId; } }