From fd74deb7458824e578a4f2ee6cc5b61e58dd9cf5 Mon Sep 17 00:00:00 2001 From: Vadim Ushakov Date: Sun, 19 Nov 2023 16:12:47 +0700 Subject: [PATCH] [gcc -fanalyzer] pcmanfm.c: Fix compiler warnings --- src/pcmanfm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pcmanfm.c b/src/pcmanfm.c index 8183023..677c829 100644 --- a/src/pcmanfm.c +++ b/src/pcmanfm.c @@ -87,7 +87,7 @@ static void unix_signal_handler(int sig_num) /* postpond the signal handling by using a pipe */ if (write(signal_pipe[1], &sig_num, sizeof(sig_num)) != sizeof(sig_num)) { g_critical("cannot bounce the signal, stop"); - exit(2); + _exit(2); } } @@ -293,8 +293,7 @@ gboolean pcmanfm_run(gint screen_num) if(cwd) fm_path_unref(cwd); fm_launch_paths_simple(NULL, NULL, paths, pcmanfm_open_folder, NULL); - g_list_foreach(paths, (GFunc)fm_path_unref, NULL); - g_list_free(paths); + g_list_free_full(paths, (GDestroyNotify) fm_path_unref); ret = (n_pcmanfm_ref >= 1); /* if there is opened window, return true to run the main loop. */ g_strfreev(files_to_open);