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
 92c39d1d8a]
This commit is contained in:
Simon McVittie 2015-03-12 19:03:12 +00:00 committed by Ralf Habacker
parent 73af0d5d5c
commit 7647179096
5 changed files with 9 additions and 8 deletions

View file

@ -1332,7 +1332,9 @@ check_get_connection_unix_process_id (BusContext *context,
dbus_bool_t retval;
DBusError error;
const char *base_service_name;
#ifdef DBUS_UNIX
dbus_uint32_t pid;
#endif
retval = FALSE;
dbus_error_init (&error);

View file

@ -1045,8 +1045,10 @@ verify_test_message_memleak (DBusMessage *message)
int our_string_array_len1;
char **our_string_array2;
int our_string_array_len2;
#ifdef HAVE_UNIX_FD_PASSING
int our_unix_fd1;
int our_unix_fd2;
#endif
DBusInitialFDs *initial_fds;
initial_fds = _dbus_check_fdleaks_enter ();

View file

@ -380,7 +380,6 @@ _dbus_stat(const DBusString *filename,
const char *filename_c;
WIN32_FILE_ATTRIBUTE_DATA wfad;
char *lastdot;
DWORD rc;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);

View file

@ -12,7 +12,7 @@
#include <stdio.h>
dbus_bool_t print_install_root()
static dbus_bool_t print_install_root()
{
char runtime_prefix[1000];
@ -25,7 +25,7 @@ dbus_bool_t print_install_root()
return TRUE;
}
dbus_bool_t print_service_dirs()
static dbus_bool_t print_service_dirs()
{
DBusList *dirs;
DBusList *link;
@ -44,7 +44,7 @@ dbus_bool_t print_service_dirs()
return TRUE;
}
dbus_bool_t print_replace_install_prefix(const char *s)
static dbus_bool_t print_replace_install_prefix(const char *s)
{
const char *s2 = _dbus_replace_install_prefix(s);
if (!s2)

View file

@ -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)