From 97c2ec8dcfe14882bafb2f2c56502427c0ffa1d0 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 27 Apr 2014 18:44:21 -0700 Subject: [PATCH] Fix a duplicated variable, and defeat some warnings in fish_tests --- fish_tests.cpp | 4 ++-- parse_execution.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fish_tests.cpp b/fish_tests.cpp index 7ec4ab8b4..6e2935148 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -2012,8 +2012,8 @@ static void test_autosuggest_suggest_special() // A single quote should defeat tilde expansion perform_one_autosuggestion_test(L"cd '~/test_autosuggest_suggest_specia'", wd, L"", __LINE__); - system("rm -Rf '/tmp/autosuggest_test/'"); - system("rm -Rf ~/test_autosuggest_suggest_special/"); + if (system("rm -Rf '/tmp/autosuggest_test/'")) err(L"rm failed"); + if (system("rm -Rf ~/test_autosuggest_suggest_special/")) err(L"rm failed"); } static void test_autosuggestion_combining() diff --git a/parse_execution.cpp b/parse_execution.cpp index d5c63aba9..3c4dfe6c1 100644 --- a/parse_execution.cpp +++ b/parse_execution.cpp @@ -503,7 +503,6 @@ parse_execution_result_t parse_execution_context_t::run_for_statement(const pars parse_execution_result_t parse_execution_context_t::run_switch_statement(const parse_node_t &statement) { assert(statement.type == symbol_switch_statement); - parse_execution_result_t ret = parse_execution_success; const parse_node_t *matching_case_item = NULL; parse_execution_result_t result = parse_execution_success; @@ -530,7 +529,7 @@ parse_execution_result_t parse_execution_context_t::run_switch_statement(const p { /* Store the node that failed to expand */ report_error(switch_value_node, WILDCARD_ERR_MSG, switch_value.c_str()); - ret = parse_execution_errored; + result = parse_execution_errored; break; }