Various compiler warning fixes

This commit is contained in:
Colin Walters 2008-12-19 18:54:59 -05:00
parent eb1ba381f6
commit 4e4f0de8cc
6 changed files with 8 additions and 6 deletions

View 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);

View 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);

View 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 (" ");

View 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;

View 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>

View 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);