mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Fix a "loop will execute at most once" warning
This commit is contained in:
parent
c0c2e1d4fa
commit
cd84587c3a
1 changed files with 3 additions and 4 deletions
|
@ -545,12 +545,11 @@ expression *test_parser::parse_args(const wcstring_list_t &args, wcstring &err)
|
||||||
expression *result = parser.parse_expression(0, (unsigned int)args.size());
|
expression *result = parser.parse_expression(0, (unsigned int)args.size());
|
||||||
|
|
||||||
// Handle errors.
|
// Handle errors.
|
||||||
for (size_t i = 0; i < parser.errors.size(); i++) {
|
// For now we only show the first error.
|
||||||
|
if (! parser.errors.empty()) {
|
||||||
err.append(L"test: ");
|
err.append(L"test: ");
|
||||||
err.append(parser.errors.at(i));
|
err.append(parser.errors.at(0));
|
||||||
err.push_back(L'\n');
|
err.push_back(L'\n');
|
||||||
// For now we only show the first error.
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
Loading…
Reference in a new issue