Silence some code analysis warnings
This commit is contained in:
parent
cd0f159238
commit
cc408864af
|
@ -946,8 +946,9 @@ void rcheevos_validate_config_settings(void)
|
||||||
const char* val = core_option_manager_get_val(coreopts, i);
|
const char* val = core_option_manager_get_val(coreopts, i);
|
||||||
if (!rc_libretro_is_setting_allowed(disallowed_settings, key, val))
|
if (!rc_libretro_is_setting_allowed(disallowed_settings, key, val))
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
size_t _len = snprintf(buffer, sizeof(buffer),
|
snprintf(buffer, sizeof(buffer),
|
||||||
msg_hash_to_str_us(MSG_CHEEVOS_HARDCORE_PAUSED_SETTING_NOT_ALLOWED), key, val);
|
msg_hash_to_str_us(MSG_CHEEVOS_HARDCORE_PAUSED_SETTING_NOT_ALLOWED), key, val);
|
||||||
CHEEVOS_LOG(RCHEEVOS_TAG "%s\n", buffer);
|
CHEEVOS_LOG(RCHEEVOS_TAG "%s\n", buffer);
|
||||||
_len = snprintf(buffer, sizeof(buffer),
|
_len = snprintf(buffer, sizeof(buffer),
|
||||||
|
@ -1270,7 +1271,7 @@ static void rcheevos_show_game_placard(void)
|
||||||
{
|
{
|
||||||
char badge_name[32];
|
char badge_name[32];
|
||||||
size_t __len = strlcpy(badge_name, "i", sizeof(badge_name));
|
size_t __len = strlcpy(badge_name, "i", sizeof(badge_name));
|
||||||
__len += strlcpy(badge_name + __len, game->badge_name,
|
strlcpy(badge_name + __len, game->badge_name,
|
||||||
sizeof(badge_name) - __len);
|
sizeof(badge_name) - __len);
|
||||||
gfx_widgets_push_achievement(game->title, msg, badge_name);
|
gfx_widgets_push_achievement(game->title, msg, badge_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,6 @@ static void Discord_RegisterW(
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
fprintf(stderr, "Error writing description\n");
|
fprintf(stderr, "Error writing description\n");
|
||||||
|
|
||||||
len = (DWORD)lstrlenW(protocolDescription) + 1;
|
|
||||||
result = RegSetKeyValueW(key, NULL, L"URL Protocol", REG_SZ, &urlProtocol, sizeof(wchar_t));
|
result = RegSetKeyValueW(key, NULL, L"URL Protocol", REG_SZ, &urlProtocol, sizeof(wchar_t));
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
fprintf(stderr, "Error writing description\n");
|
fprintf(stderr, "Error writing description\n");
|
||||||
|
|
|
@ -1741,7 +1741,7 @@ static unsigned menu_displaylist_parse_supported_cores(
|
||||||
_len += strlcpy(entry_alt_text + _len,
|
_len += strlcpy(entry_alt_text + _len,
|
||||||
pending_core_name,
|
pending_core_name,
|
||||||
sizeof(entry_alt_text) - _len);
|
sizeof(entry_alt_text) - _len);
|
||||||
_len += strlcpy(entry_alt_text + _len, ")", sizeof(entry_alt_text) - _len);
|
strlcpy(entry_alt_text + _len, ")", sizeof(entry_alt_text) - _len);
|
||||||
|
|
||||||
menu_entries_prepend(info->list, pending_core_path,
|
menu_entries_prepend(info->list, pending_core_path,
|
||||||
msg_hash_to_str(current_core_enum_label),
|
msg_hash_to_str(current_core_enum_label),
|
||||||
|
@ -6854,7 +6854,7 @@ static unsigned menu_displaylist_populate_subsystem(
|
||||||
_len += strlcpy(s + _len,
|
_len += strlcpy(s + _len,
|
||||||
subsystem->roms[content_get_subsystem_rom_id()].desc,
|
subsystem->roms[content_get_subsystem_rom_id()].desc,
|
||||||
sizeof(s) - _len);
|
sizeof(s) - _len);
|
||||||
_len += strlcpy(s + _len, "]", sizeof(s) - _len);
|
strlcpy(s + _len, "]", sizeof(s) - _len);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15441,7 +15441,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||||
{
|
{
|
||||||
if (_len > 0)
|
if (_len > 0)
|
||||||
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
||||||
_len += strlcpy(new_exts + _len, "slang", sizeof(new_exts) - _len);
|
strlcpy(new_exts + _len, "slang", sizeof(new_exts) - _len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -15485,7 +15485,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||||
{
|
{
|
||||||
if (_len > 0)
|
if (_len > 0)
|
||||||
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
||||||
_len += strlcpy(new_exts + _len, "slangp", sizeof(new_exts) - _len);
|
strlcpy(new_exts + _len, "slangp", sizeof(new_exts) - _len);
|
||||||
}
|
}
|
||||||
if (!string_is_empty(info->exts))
|
if (!string_is_empty(info->exts))
|
||||||
free(info->exts);
|
free(info->exts);
|
||||||
|
@ -15523,7 +15523,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||||
#ifdef HAVE_RTGA
|
#ifdef HAVE_RTGA
|
||||||
if (_len > 0)
|
if (_len > 0)
|
||||||
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
_len += strlcpy(new_exts + _len, "|", sizeof(new_exts) - _len);
|
||||||
_len += strlcpy(new_exts + _len, "tga", sizeof(new_exts) - _len);
|
strlcpy(new_exts + _len, "tga", sizeof(new_exts) - _len);
|
||||||
#endif
|
#endif
|
||||||
if (!string_is_empty(info->exts))
|
if (!string_is_empty(info->exts))
|
||||||
free(info->exts);
|
free(info->exts);
|
||||||
|
@ -15679,7 +15679,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||||
if (_len > 0)
|
if (_len > 0)
|
||||||
{
|
{
|
||||||
_len += strlcpy(ext_names + _len, "|", sizeof(ext_names) - _len);
|
_len += strlcpy(ext_names + _len, "|", sizeof(ext_names) - _len);
|
||||||
_len += strlcpy(ext_names + _len, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names) - _len);
|
strlcpy(ext_names + _len, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names) - _len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strlcpy(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names));
|
strlcpy(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names));
|
||||||
|
|
Loading…
Reference in New Issue