[gnome-desktop/wjt/fix-unused-function-without-systemd] systemd: Avoid unused function warning when disabled
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop/wjt/fix-unused-function-without-systemd] systemd: Avoid unused function warning when disabled
- Date: Thu, 16 Dec 2021 21:21:11 +0000 (UTC)
commit f18dee1d20f2fb831a9baea462132cb67ee63206
Author: Will Thompson <will willthompson co uk>
Date: Thu Dec 16 21:18:48 2021 +0000
systemd: Avoid unused function warning when disabled
If the project is configured to build without systemd support, this
function is unused.
If one is foolish enough to also build with -Werror, as I am, then this
the resulting unused-function warning is fatal and one is sad.
libgnome-desktop/gnome-systemd.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/libgnome-desktop/gnome-systemd.c b/libgnome-desktop/gnome-systemd.c
index 89e0a423..3773f3ba 100644
--- a/libgnome-desktop/gnome-systemd.c
+++ b/libgnome-desktop/gnome-systemd.c
@@ -143,6 +143,7 @@ on_bus_gotten_cb (GObject *source,
}
#endif
+#ifdef HAVE_SYSTEMD
static gchar *
systemd_unit_name_escape (const gchar *in)
{
@@ -158,6 +159,7 @@ systemd_unit_name_escape (const gchar *in)
}
return g_string_free (str, FALSE);
}
+#endif
/**
* gnome_start_systemd_scope:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]