Various compiler warning fixes
authorColin Walters <walters@verbum.org>
Fri, 19 Dec 2008 23:54:59 +0000 (18:54 -0500)
committerColin Walters <walters@verbum.org>
Tue, 6 Jan 2009 22:38:32 +0000 (17:38 -0500)
bus/config-parser.h
bus/driver.c
dbus/dbus-marshal-basic.c
dbus/dbus-spawn.c
dbus/dbus-sysdeps-util-unix.c
dbus/dbus-sysdeps.c

index fcc5f5d..b951d1d 100644 (file)
@@ -65,6 +65,7 @@ const char* bus_config_parser_get_type         (BusConfigParser *parser);
 DBusList**  bus_config_parser_get_addresses    (BusConfigParser *parser);
 DBusList**  bus_config_parser_get_mechanisms   (BusConfigParser *parser);
 dbus_bool_t bus_config_parser_get_fork         (BusConfigParser *parser);
+dbus_bool_t bus_config_parser_get_allow_anonymous (BusConfigParser *parser);
 dbus_bool_t bus_config_parser_get_syslog       (BusConfigParser *parser);
 const char* bus_config_parser_get_pidfile      (BusConfigParser *parser);
 const char* bus_config_parser_get_servicehelper (BusConfigParser *parser);
index 05ecd56..c97bff5 100644 (file)
@@ -1411,7 +1411,7 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection,
   BusService *serv;
   DBusConnection *conn;
   DBusMessage *reply;
-  char *data = NULL;
+  void *data = NULL;
   dbus_uint32_t data_size;
 
   _DBUS_ASSERT_ERROR_IS_CLEAR (error);
index 0a33ff1..724d94b 100644 (file)
@@ -1333,7 +1333,7 @@ _dbus_verbose_bytes (const unsigned char *data,
 
   if (aligned != data)
     {
-      _dbus_verbose ("%4d\t%p: ", - (data - aligned), aligned);
+      _dbus_verbose ("%4ld\t%p: ", - (long)(data - aligned), aligned);
       while (aligned != data)
         {
           _dbus_verbose ("    ");
index 35ccba6..f4e3b58 100644 (file)
@@ -36,6 +36,8 @@
 #include <errno.h>
 #endif
 
+extern char **environ;
+
 /**
  * @addtogroup DBusInternalsUtils
  * @{
@@ -914,8 +916,6 @@ do_exec (int                       child_err_report_fd,
 
   if (envp == NULL)
     {
-      extern char **environ;
-
       _dbus_assert (environ != NULL);
 
       envp = environ;
index 6ca662b..be7bc96 100644 (file)
@@ -43,6 +43,7 @@
 #include <sys/socket.h>
 #include <dirent.h>
 #include <sys/un.h>
+#include <syslog.h>
 #ifdef HAVE_LIBAUDIT
 #include <sys/prctl.h>
 #include <sys/capability.h>
index d740f87..00a1a3d 100644 (file)
@@ -51,6 +51,8 @@ _DBUS_DEFINE_GLOBAL_LOCK (win_fds);
 _DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache);
 _DBUS_DEFINE_GLOBAL_LOCK (system_users);
 
+extern char **environ;
+
 /**
  * @defgroup DBusSysdeps Internal system-dependent API
  * @ingroup DBusInternals
@@ -191,7 +193,6 @@ _dbus_clearenv (void)
   if (clearenv () != 0)
      rc = FALSE;
 #else
-  extern char **environ;
 
   if (environ != NULL)
     environ[0] = NULL;
@@ -210,7 +211,6 @@ char **
 _dbus_get_environment (void)
 {
   int i, length;
-  extern char **environ;
   char **environment;
 
   _dbus_assert (environ != NULL);