From db9b3347d2e001c7530f471e7e89c1b34011e7cf Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Fri, 13 Sep 2024 08:49:08 +0000 Subject: [PATCH] fix build failure with GCC 14 --- .github/workflows/build.yml | 2 +- src/gtkdialog.c | 3 ++- src/signals.c | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 020a5df..4643e3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ["ubuntu:noble", "ubuntu:jammy", "ubuntu:focal"] + image: ["debian:trixie-slim", "ubuntu:noble", "ubuntu:jammy", "ubuntu:focal"] container: image: ${{ matrix.image }} env: diff --git a/src/gtkdialog.c b/src/gtkdialog.c index 7b820e3..726d89b 100644 --- a/src/gtkdialog.c +++ b/src/gtkdialog.c @@ -344,7 +344,8 @@ gint get_program_from_variable(gchar *name) static gint get_program_from_file(char *name) { - int tmp, result; + size_t tmp; + ssize_t result; PIP_DEBUG("Start."); diff --git a/src/signals.c b/src/signals.c index 64224fe..9a3f001 100644 --- a/src/signals.c +++ b/src/signals.c @@ -1127,7 +1127,7 @@ void on_any_widget_file_changed_event(GFileMonitor *monitor, GFile *file, #ifdef DEBUG_TRANSITS fprintf(stderr, "%s(): Exiting.\n", __func__); #endif -#if GTK_CHECK_VERSION(3,0,0) +#if HAVE_SYS_INOTIFY_H && GTK_CHECK_VERSION(3,0,0) return TRUE; #endif } @@ -1255,13 +1255,17 @@ void on_any_widget_auto_refresh_event(GFileMonitor *monitor, GFile *file, break; default: fprintf(stderr, "%s(): Unhandled widget type.\n", __func__); +#if HAVE_SYS_INOTIFY_H && GTK_CHECK_VERSION(3,0,0) return FALSE; +#else + return; +#endif } #ifdef DEBUG_TRANSITS fprintf(stderr, "%s(): Exiting.\n", __func__); #endif -#if GTK_CHECK_VERSION(3,0,0) +#if HAVE_SYS_INOTIFY_H && GTK_CHECK_VERSION(3,0,0) return TRUE; #endif }