mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Simplify code, and no longer have to deal with GCC suppression of warnings
This commit is contained in:
parent
388183d971
commit
b200ab6f8f
@ -7798,6 +7798,10 @@ unsigned menu_displaylist_build_list(
|
|||||||
&sys_info->disk_control,
|
&sys_info->disk_control,
|
||||||
i, image_label, sizeof(image_label));
|
i, image_label, sizeof(image_label));
|
||||||
|
|
||||||
|
snprintf(
|
||||||
|
current_image_str, sizeof(current_image_str),
|
||||||
|
"%0*u", num_digits, i + 1);
|
||||||
|
|
||||||
/* Get string representation of disk index
|
/* Get string representation of disk index
|
||||||
* > Note that displayed index starts at '1',
|
* > Note that displayed index starts at '1',
|
||||||
* not '0' */
|
* not '0' */
|
||||||
@ -7805,19 +7809,11 @@ unsigned menu_displaylist_build_list(
|
|||||||
{
|
{
|
||||||
/* Note: 2-space gap is intentional
|
/* Note: 2-space gap is intentional
|
||||||
* (for clarity) */
|
* (for clarity) */
|
||||||
int n = snprintf(
|
strlcat(current_image_str,
|
||||||
current_image_str, sizeof(current_image_str),
|
": ", sizeof(current_image_str));
|
||||||
"%0*u: %s", num_digits, i + 1, image_label);
|
strlcat(current_image_str,
|
||||||
|
image_label, sizeof(current_image_str));
|
||||||
/* Suppress GCC warnings... */
|
|
||||||
if ((n < 0) || (n >= PATH_MAX_LENGTH))
|
|
||||||
n = 0;
|
|
||||||
(void)n;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
snprintf(
|
|
||||||
current_image_str, sizeof(current_image_str),
|
|
||||||
"%0*u", num_digits, i + 1);
|
|
||||||
|
|
||||||
/* Add menu entry */
|
/* Add menu entry */
|
||||||
if (menu_entries_append_enum(list,
|
if (menu_entries_append_enum(list,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user