diff options
Diffstat (limited to 'builtin_test.cpp')
-rw-r--r-- | builtin_test.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/builtin_test.cpp b/builtin_test.cpp index 0d16823a..23369628 100644 --- a/builtin_test.cpp +++ b/builtin_test.cpp @@ -646,13 +646,11 @@ expression *test_parser::parse_args(const wcstring_list_t &args, wcstring &err) expression *result = parser.parse_expression(0, (unsigned int)args.size()); /* Handle errors */ - bool errored = false; for (size_t i = 0; i < parser.errors.size(); i++) { err.append(L"test: "); err.append(parser.errors.at(i)); err.push_back(L'\n'); - errored = true; // For now we only show the first error break; } @@ -667,14 +665,12 @@ expression *test_parser::parse_args(const wcstring_list_t &args, wcstring &err) { append_format(err, L"test: unexpected argument at index %lu: '%ls'\n", (unsigned long)result->range.end, args.at(result->range.end).c_str()); } - errored = true; delete result; result = NULL; } } - return result; } |