[PATCH] util: fix compile warning in virsystemd.c during mingw builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A function was changed from having no arguments to having a single
argument, but the entire body of the function was #ifdefed out for
windows builds, leaving that new argument unused. Surprisingly this
didn't cause the build to fail, but I happened to notice it flit by
during an rpm build.

Fixes: 785cd56e5803fbbf60715fb6c7536360df5b4b9e
Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---

I'm pushing this as trivial (technically it's not a build breaker,
since the build still continues even with the warning :-P)

 src/util/virsystemd.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 57fe409c57..92d2890360 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -624,10 +624,15 @@ int virSystemdTerminateMachine(const char *name)
     return 0;
 }
 
+#ifdef WIN32
+static void
+virSystemdNotify(const char *msg G_GNUC_UNUSED)
+{
+}
+#else
 static void
 virSystemdNotify(const char *msg)
 {
-#ifndef WIN32
     const char *path;
     int fd;
     struct sockaddr_un un = {
@@ -672,8 +677,8 @@ virSystemdNotify(const char *msg)
         VIR_WARN("Failed to notify systemd");
 
     VIR_FORCE_CLOSE(fd);
-#endif /* !WIN32 */
 }
+#endif /* !WIN32 */
 
 void virSystemdNotifyReady(void)
 {
-- 
2.47.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux