Remove unused variables
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Wed, 22 Aug 2018 14:39:47 +0000 (17:39 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 24 Aug 2018 15:36:22 +0000 (18:36 +0300)
src/debug/netcoredbg/jmc.cpp
src/debug/netcoredbg/miprotocol.cpp
src/debug/netcoredbg/typeprinter.cpp
src/debug/netcoredbg/valueprint.cpp
src/debug/netcoredbg/valuewalk.cpp
src/debug/netcoredbg/variables.cpp

index 7d526df..7041474 100644 (file)
@@ -109,7 +109,6 @@ static bool HasAttribute(IMetaDataImport *pMD, mdToken tok, const std::string &a
 
 static bool HasSourceLocation(SymbolReader *symbolReader, mdMethodDef methodDef)
 {
-    HRESULT Status;
     std::vector<SymbolReader::SequencePoint> points;
     if (FAILED(symbolReader->GetSequencePoints(methodDef, points)))
         return false;
@@ -135,7 +134,6 @@ static HRESULT GetNonJMCMethodsForTypeDef(
     mdMethodDef methodDef;
     while(SUCCEEDED(pMD->EnumMethods(&fEnum, typeDef, &methodDef, 1, &numMethods)) && numMethods != 0)
     {
-        HRESULT hr;
         mdTypeDef memTypeDef;
         ULONG nameLen;
         WCHAR szFunctionName[mdNameLen] = {0};
index b8d9ebc..9a29033 100644 (file)
@@ -161,7 +161,6 @@ HRESULT MIProtocol::StepCommand(const std::vector<std::string> &args,
                                 std::string &output,
                                 Debugger::StepType stepType)
 {
-    HRESULT Status;
     DWORD threadId = GetIntArg(args, "--thread", m_debugger->GetLastStoppedThreadId());
     m_debugger->StepCommand(threadId, stepType);
     output = "^running";
@@ -177,8 +176,6 @@ static std::string AddrToString(uint64_t addr)
 
 HRESULT MIProtocol::PrintFrameLocation(const StackFrame &stackFrame, std::string &output)
 {
-    HRESULT Status;
-
     std::ostringstream ss;
 
     if (!stackFrame.source.IsNull())
@@ -250,8 +247,6 @@ HRESULT MIProtocol::PrintVariables(const std::vector<Variable> &variables, std::
     const bool printValues = true;
     const bool printTypes = false;
 
-    HRESULT Status;
-
     std::ostringstream ss;
     ss << "variables=[";
     const char *sep = "";
@@ -436,8 +431,6 @@ void MIProtocol::DeleteBreakpoints(const std::unordered_set<uint32_t> &ids)
 
 void MIProtocol::EmitStoppedEvent(StoppedEvent event)
 {
-    HRESULT Status;
-
     std::string frameLocation;
     PrintFrameLocation(event.frame, frameLocation);
 
@@ -586,7 +579,6 @@ HRESULT MIProtocol::HandleCommand(std::string command,
     { "break-insert", [this](const std::vector<std::string> &args, std::string &output) -> HRESULT {
         std::string filename;
         unsigned int linenum;
-        ULONG32 id;
         Breakpoint breakpoint;
         if (ParseBreakpoint(args, filename, linenum)
             && SUCCEEDED(SetBreakpoint(filename, linenum, breakpoint)))
@@ -671,8 +663,6 @@ HRESULT MIProtocol::HandleCommand(std::string command,
         return S_OK;
     }},
     { "var-create", [this](const std::vector<std::string> &args, std::string &output) -> HRESULT {
-        HRESULT Status;
-
         if (args.size() < 2)
         {
             output = "Command requires at least 2 arguments";
@@ -690,8 +680,6 @@ HRESULT MIProtocol::HandleCommand(std::string command,
         return CreateVar(threadId, level, varName, varExpr, output);
     }},
     { "var-list-children", [this](const std::vector<std::string> &args_orig, std::string &output) -> HRESULT {
-        HRESULT Status;
-
         std::vector<std::string> args = args_orig;
 
         int print_values = 0;
index 6882c8b..d05c2e6 100644 (file)
@@ -757,7 +757,6 @@ HRESULT TypePrinter::GetTypeAndMethod(ICorDebugFrame *pFrame, std::string &typeN
     mdTypeDef typeDef;
     IfFailRet(pClass->GetToken(&typeDef));
 
-    HRESULT hr;
     mdTypeDef memTypeDef;
     ULONG nameLen;
     DWORD flags;
index d5dcf30..e1369f3 100644 (file)
@@ -133,7 +133,6 @@ static HRESULT PrintEnumValue(ICorDebugValue* pInputValue, BYTE* enumValue, std:
         ULONG             nameLen = 0;
         DWORD             fieldAttr = 0;
         WCHAR             mdName[mdNameLen];
-        WCHAR             typeName[mdNameLen];
         UVCP_CONSTANT     pRawValue = NULL;
         ULONG             rawValueLength = 0;
         if(SUCCEEDED(pMD->GetFieldProps(fieldDef, NULL, mdName, mdNameLen, &nameLen, &fieldAttr, NULL, NULL, NULL, &pRawValue, &rawValueLength)))
@@ -415,7 +414,6 @@ static HRESULT PrintArrayValue(ICorDebugValue *pValue,
     std::string elementType;
     std::string arrayType;
 
-    CorElementType corElemType;
     ToRelease<ICorDebugType> pFirstParameter;
     ToRelease<ICorDebugValue2> pValue2;
     ToRelease<ICorDebugType> pType;
index cd96322..b728399 100644 (file)
@@ -89,7 +89,7 @@ HRESULT Evaluator::WaitEvalResult(ICorDebugThread *pThread,
             return E_FAIL;
         *ppEvalResult = evalResult->Detach();
     }
-    catch (const std::future_error& e)
+    catch (const std::future_error&)
     {
        return E_FAIL;
     }
@@ -253,7 +253,6 @@ HRESULT Evaluator::ObjectToString(
 
     // Get ToString method token
 
-    mdTypeDef currentTypeDef;
     ToRelease<ICorDebugClass> pClass;
     ToRelease<ICorDebugValue2> pValue2;
     ToRelease<ICorDebugType> pType;
@@ -310,7 +309,7 @@ HRESULT Evaluator::ObjectToString(
             if (result->GetPtr())
                 PrintValue(result->GetPtr(), output, escape);
         }
-        catch (const std::future_error& e)
+        catch (const std::future_error&)
         {
         }
         cb(output);
index 13c68c9..9efce4a 100644 (file)
@@ -196,7 +196,6 @@ HRESULT Variables::GetVariables(
 
 void Variables::AddVariableReference(Variable &variable, uint64_t frameId, ICorDebugValue *value, ValueKind valueKind)
 {
-    HRESULT Status;
     unsigned int numChild = 0;
     GetNumChild(value, numChild, valueKind == ValueIsClass);
     if (numChild == 0)