mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-22 03:22:39 +02:00
ams: add -Wno-format-truncation to flags
This commit is contained in:
parent
8ab659c131
commit
d061a52230
@ -17,8 +17,10 @@ endif
|
|||||||
|
|
||||||
export ATMOSPHERE_DEFINES := -DATMOSPHERE
|
export ATMOSPHERE_DEFINES := -DATMOSPHERE
|
||||||
export ATMOSPHERE_SETTINGS := -fPIE -g
|
export ATMOSPHERE_SETTINGS := -fPIE -g
|
||||||
export ATMOSPHERE_CFLAGS := -Wall -ffunction-sections -fdata-sections -fno-strict-aliasing -fwrapv \
|
export ATMOSPHERE_CFLAGS := -Wall -ffunction-sections -fdata-sections -fno-strict-aliasing -fwrapv \
|
||||||
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector
|
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector \
|
||||||
|
-Wno-format-truncation
|
||||||
|
|
||||||
export ATMOSPHERE_CXXFLAGS := -fno-rtti -fno-exceptions -std=gnu++20
|
export ATMOSPHERE_CXXFLAGS := -fno-rtti -fno-exceptions -std=gnu++20
|
||||||
export ATMOSPHERE_ASFLAGS :=
|
export ATMOSPHERE_ASFLAGS :=
|
||||||
|
|
||||||
|
@ -86,22 +86,17 @@ namespace ams::emummc {
|
|||||||
const Storage storage = static_cast<Storage>(g_exo_config.base_cfg.type);
|
const Storage storage = static_cast<Storage>(g_exo_config.base_cfg.type);
|
||||||
g_is_emummc = g_exo_config.base_cfg.magic == StorageMagic && storage != Storage_Emmc;
|
g_is_emummc = g_exo_config.base_cfg.magic == StorageMagic && storage != Storage_Emmc;
|
||||||
|
|
||||||
/* Format paths. Ignore string format warnings. */
|
/* Format paths. */
|
||||||
#pragma GCC diagnostic push
|
if (storage == Storage_SdFile) {
|
||||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
std::snprintf(g_exo_config.file_cfg.path, sizeof(g_exo_config.file_cfg.path), "/%s", paths->file_path);
|
||||||
{
|
}
|
||||||
if (storage == Storage_SdFile) {
|
|
||||||
std::snprintf(g_exo_config.file_cfg.path, sizeof(g_exo_config.file_cfg.path), "/%s", paths->file_path);
|
std::snprintf(g_exo_config.emu_dir_path, sizeof(g_exo_config.emu_dir_path), "/%s", paths->nintendo_path);
|
||||||
}
|
|
||||||
|
/* If we're emummc, implement default nintendo redirection path. */
|
||||||
std::snprintf(g_exo_config.emu_dir_path, sizeof(g_exo_config.emu_dir_path), "/%s", paths->nintendo_path);
|
if (g_is_emummc && std::strcmp(g_exo_config.emu_dir_path, "/") == 0) {
|
||||||
|
std::snprintf(g_exo_config.emu_dir_path, sizeof(g_exo_config.emu_dir_path), "/emummc/Nintendo_%04x", g_exo_config.base_cfg.id);
|
||||||
/* If we're emummc, implement default nintendo redirection path. */
|
|
||||||
if (g_is_emummc && std::strcmp(g_exo_config.emu_dir_path, "/") == 0) {
|
|
||||||
std::snprintf(g_exo_config.emu_dir_path, sizeof(g_exo_config.emu_dir_path), "/emummc/Nintendo_%04x", g_exo_config.base_cfg.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_has_cached = true;
|
g_has_cached = true;
|
||||||
|
@ -237,10 +237,7 @@ namespace ams::patcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Print the path for this directory. */
|
/* Print the path for this directory. */
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
|
||||||
std::snprintf(path + patches_dir_path_len, sizeof(path) - patches_dir_path_len, "/%s", entry.name);
|
std::snprintf(path + patches_dir_path_len, sizeof(path) - patches_dir_path_len, "/%s", entry.name);
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
const size_t patch_dir_path_len = patches_dir_path_len + 1 + std::strlen(entry.name);
|
const size_t patch_dir_path_len = patches_dir_path_len + 1 + std::strlen(entry.name);
|
||||||
|
|
||||||
/* Open the patch directory. */
|
/* Open the patch directory. */
|
||||||
|
Loading…
Reference in New Issue
Block a user