Fix some "variable 'foo' set but not used" warnings
authorPavel Labath <pavel@labath.sk>
Mon, 18 Mar 2019 16:04:46 +0000 (16:04 +0000)
committerPavel Labath <pavel@labath.sk>
Mon, 18 Mar 2019 16:04:46 +0000 (16:04 +0000)
gcc-8 diagnoses these.

llvm-svn: 356378

lldb/source/API/SBFrame.cpp
lldb/source/API/SBTarget.cpp

index bfa4621f591c0870f16c16531c0fafd0e41317c1..6a28ef6cc60fa5e2ca365788c508acd06463eee9 100644 (file)
@@ -1084,7 +1084,6 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
   Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 #endif
 
-  ExpressionResults exe_results = eExpressionSetupError;
   SBValue expr_result;
 
   if (expr == nullptr || expr[0] == '\0') {
@@ -1117,8 +1116,7 @@ lldb::SBValue SBFrame::EvaluateExpression(const char *expr,
               frame_description.GetData());
         }
 
-        exe_results = target->EvaluateExpression(expr, frame, expr_value_sp,
-                                                 options.ref());
+        target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());
         expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
       }
     }
index 96bb80799f1dd1de794c2786efa497ddcdfe2b65..c168ae0d2cc9d6d6865c0bca14b72bea57b96532 100644 (file)
@@ -2356,7 +2356,6 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
   Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 #endif
   SBValue expr_result;
-  ExpressionResults exe_results = eExpressionSetupError;
   ValueObjectSP expr_value_sp;
   TargetSP target_sp(GetSP());
   StackFrame *frame = NULL;
@@ -2383,8 +2382,7 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
           expr, options.GetFetchDynamicValue(),
           frame_description.GetString().str().c_str());
 #endif
-      exe_results =
-          target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());
+      target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());
 
       expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
     }