summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-03-12 19:03:12 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2015-03-24 08:27:09 +0100
commit7647179096426e4dc76332696eea926ea3def41a (patch)
treeb591d966d0809443a8d204a0239d158ce97d7f0d /tools
parent73af0d5d5c953d157e89f6c02d61872a0c490edf (diff)
Fix assorted compiler warnings on Windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> [rh: rebased because a few hunks have already been applied with commit 92c39d1d8a30110c5760bd8d5e695e26a8538d1a]
Diffstat (limited to 'tools')
-rw-r--r--tools/dbus-print-message.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
index 1891da77..80c96986 100644
--- a/tools/dbus-print-message.c
+++ b/tools/dbus-print-message.c
@@ -155,10 +155,10 @@ print_ay (DBusMessageIter *iter, int depth)
}
}
+#ifdef DBUS_UNIX
static void
print_fd (int fd, int depth)
{
-#ifdef DBUS_UNIX
int ret;
struct stat statbuf = {0,};
union {
@@ -172,7 +172,6 @@ print_fd (int fd, int depth)
int addrlen = sizeof (addr);
int peerlen = sizeof (peer);
int has_peer;
-#endif
/* Don't print the fd number: it is different in every process and since
* dbus-monitor closes the fd after reading it, the same number would be
@@ -182,7 +181,6 @@ print_fd (int fd, int depth)
if (fd == -1)
return;
-#ifdef DBUS_UNIX
ret = fstat (fd, &statbuf);
if (ret == -1)
return;
@@ -297,8 +295,8 @@ print_fd (int fd, int depth)
printf ("unknown (%d)\n", addr.sa.sa_family);
break;
}
-#endif
}
+#endif
static void
print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)