Fix snprintf static string error

This commit is contained in:
dec05eba
2026-01-27 20:35:49 +01:00
parent ee873e2000
commit 16ca12f29b
2 changed files with 4 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
project('gsr-ui', ['c', 'cpp'], version : '1.10.5', default_options : ['warning_level=2', 'cpp_std=c++17'], subproject_dir : 'depends')
add_project_arguments('-D_FILE_OFFSET_BITS=64', language : ['c', 'cpp'])
add_project_arguments('-Wno-format-security', language : ['c', 'cpp'])
if get_option('buildtype') == 'debug'
add_project_arguments('-g3', language : ['c', 'cpp'])

View File

@@ -326,9 +326,9 @@ namespace gsr {
char str[128];
if(gsr_info->system_info.display_server == DisplayServer::X11)
snprintf(str, sizeof(str), TR("Start/stop recording a window:"));
snprintf(str, sizeof(str), "%s", TR("Start/stop recording a window:"));
else
snprintf(str, sizeof(str), TR("Start/stop recording with desktop portal:"));
snprintf(str, sizeof(str), "%s", TR("Start/stop recording with desktop portal:"));
list->add_widget(std::make_unique<Label>(&get_theme().body_font, str, get_color_theme().text_color));
auto start_stop_recording_window_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));
@@ -392,9 +392,9 @@ namespace gsr {
char str[128];
if(gsr_info->system_info.display_server == DisplayServer::X11)
snprintf(str, sizeof(str), TR("Take a screenshot of a window:"));
snprintf(str, sizeof(str), "%s", TR("Take a screenshot of a window:"));
else
snprintf(str, sizeof(str), TR("Take a screenshot with desktop portal:"));
snprintf(str, sizeof(str), "%s", TR("Take a screenshot with desktop portal:"));
list->add_widget(std::make_unique<Label>(&get_theme().body_font, str, get_color_theme().text_color));
auto take_screenshot_window_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));