Fix red introduced in 41d5ca3c48

Later GCC versions are apparently more permissive than older versions
when it comes to variable declarations not part of a block (ie {} that
immediately follows a case statement.

This resulted in every non-simulator device target failing to build,
along with sim build on older compilers.  I should have caught this in
the review; mea culpa.

Change-Id: Id32e085e34601cca7be273ed45711a4b8ee182a0
This commit is contained in:
Solomon Peachy 2026-01-13 17:28:36 -05:00
parent bc32d43c17
commit 4850684149

View file

@ -1165,6 +1165,7 @@ const char *get_token_value(struct gui_wps *gwps,
goto gtv_ret_numeric_tag_info;
case SKIN_TOKEN_PLAYLIST_PERCENT:
{
int playlist_amt = playlist_amount();
int current_pos = playlist_get_display_index() + offset;
int percentage = current_pos * 100 / playlist_amt;
@ -1181,7 +1182,7 @@ const char *get_token_value(struct gui_wps *gwps,
itoa_buf(buf, buf_size, percentage);
numeric_buf = buf;
goto gtv_ret_numeric_tag_info;
}
case SKIN_TOKEN_PLAYLIST_SHUFFLE:
if ( global_settings.playlist_shuffle )
return "s";