mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
lint: goto and dead code
This commit is contained in:
parent
003ea83410
commit
23c3101440
1 changed files with 6 additions and 4 deletions
|
@ -597,8 +597,7 @@ int builtin_printf_state_t::print_formatted(const wchar_t *format, int argc, wch
|
||||||
}
|
}
|
||||||
|
|
||||||
modify_allowed_format_specifiers(ok, "aAcdeEfFgGiosuxX", true);
|
modify_allowed_format_specifiers(ok, "aAcdeEfFgGiosuxX", true);
|
||||||
|
for (bool continue_looking_for_flags = true; continue_looking_for_flags;) {
|
||||||
for (;; f++, direc_length++) {
|
|
||||||
switch (*f) {
|
switch (*f) {
|
||||||
case L'I':
|
case L'I':
|
||||||
case L'\'': {
|
case L'\'': {
|
||||||
|
@ -619,12 +618,15 @@ int builtin_printf_state_t::print_formatted(const wchar_t *format, int argc, wch
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
goto no_more_flag_characters;
|
continue_looking_for_flags = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (continue_looking_for_flags) {
|
||||||
|
f++;
|
||||||
|
direc_length++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
no_more_flag_characters:;
|
|
||||||
|
|
||||||
if (*f == L'*') {
|
if (*f == L'*') {
|
||||||
++f;
|
++f;
|
||||||
|
|
Loading…
Reference in a new issue