From 06322947264a0032f11756cdc28007f1082961cb Mon Sep 17 00:00:00 2001 From: asmeron Date: Tue, 19 Nov 2024 19:56:45 +0600 Subject: [PATCH 1/3] Fix source/CMakeLists.txt for build package --- source/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 10d961c..5da5458 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -65,7 +65,8 @@ add_custom_target( ) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ +#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection") @@ -80,7 +81,7 @@ set(LIBRARIES ${GTK_LIBRARIES} ${WEBKIT_LIBRARIES} ${UTILS_LIBRARIES} - ${VTE291_LIBRARIES} + ${VTE291_LIBRARIES} pthread ublsettings ublsettings-gtk3 From 34a1b1366062eb48c3491f99d44d8f474980aee4 Mon Sep 17 00:00:00 2001 From: asmeron Date: Tue, 19 Nov 2024 20:07:30 +0600 Subject: [PATCH 2/3] Fix source/CMakeLists.txt for build package --- source/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 5da5458..459ed5a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -64,18 +64,22 @@ add_custom_target( DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} ) - -#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ - -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ + -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection") + +string(FIND "${CMAKE_CXX_FLAGS}" "-D_FORTIFY_SOURCE" FORTIFY_FOUND) + +if(FORTIFY_FOUND EQUAL -1) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wp,-D_FORTIFY_SOURCE=2") +endif() set(SOURCE_FILES ubl-settings-kernel.c ubl-settings-kernel.h ubl-strings.h - ) +) set(LIBRARIES ${GTK_LIBRARIES} @@ -85,7 +89,8 @@ set(LIBRARIES pthread ublsettings ublsettings-gtk3 - ublsettingsui-gtk3) + ublsettingsui-gtk3 +) add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}) From 2c8672a3e9c514a98454ff61a8335b49fee6e51f Mon Sep 17 00:00:00 2001 From: asmeron Date: Fri, 22 Nov 2024 21:58:12 +0600 Subject: [PATCH 3/3] Fix -Werror=unused-result --- source/ubl-settings-kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-kernel.c b/source/ubl-settings-kernel.c index 1dae467..f20171f 100644 --- a/source/ubl-settings-kernel.c +++ b/source/ubl-settings-kernel.c @@ -577,7 +577,7 @@ void on_module_remove_clicked(GtkWidget *self,dictionary *dict){ char *target = yon_package_string_set(tab->module); char *command = remove_command(target); char *command_unload = unload_command(target); - system(yon_debug_output("%s\n",command_unload)); + if (system(yon_debug_output("%s\n",command_unload))){}; g_signal_connect(G_OBJECT(widgets->InstallTerminal),"child-exited",G_CALLBACK(on_module_remove_done),tab); yon_command_execute_async(command,widgets); tab->module_installed=0;