From 7a05ac08787a45b2189fdf921b1de49e27fca82b Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 8 May 2024 15:48:42 +0200 Subject: [PATCH] Fix optimized build Signed-off-by: falkTX --- .github/workflows/build.yml | 4 ++-- src/ipc/ipc_proc.h | 2 +- src/ui-client.c | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a84138..b944e69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ on: - '*' env: - CFLAGS: -Werror - CXXFLAGS: -Werror + CFLAGS: -Werror -O2 + CXXFLAGS: -Werror -O2 DEBIAN_FRONTEND: noninteractive jobs: diff --git a/src/ipc/ipc_proc.h b/src/ipc/ipc_proc.h index d5eae43..245f621 100644 --- a/src/ipc/ipc_proc.h +++ b/src/ipc/ipc_proc.h @@ -54,7 +54,7 @@ ipc_proc_t* ipc_proc_start(const char* const args[]) #endif */ - ipc_proc_t* const proc = (ipc_proc_t*)calloc(1, sizeof(ipc_proc_t)); + ipc_proc_t* volatile const proc = (ipc_proc_t*)calloc(1, sizeof(ipc_proc_t)); if (proc == NULL) { fprintf(stderr, "[ipc] ipc_proc_start failed: out of memory\n"); diff --git a/src/ui-client.c b/src/ui-client.c index 2621556..9d16073 100644 --- a/src/ui-client.c +++ b/src/ui-client.c @@ -177,8 +177,6 @@ static void lv2ui_uris_cleanup(LV2UI_URIs* const uiuris) { for (uint32_t i = 0; i < uiuris->max_urid; ++i) free(uiuris->uris[i]); - - free(uiuris); } static void lv2ui_write_function(LV2UI_Controller controller,