Commit 64a6fb7a authored by Kalev Lember's avatar Kalev Lember

More compiler warning fixes

parent 6f00470c
......@@ -80,7 +80,7 @@ next_location_path (GClueServiceClient *client)
GClueServiceClientPrivate *priv = client->priv;
char *path, *index_str;
index_str = g_strdup_printf ("%llu", (priv->locations_updated)++),
index_str = g_strdup_printf ("%u", (priv->locations_updated)++),
path = g_strjoin ("/", priv->path, "Location", index_str, NULL);
g_free (index_str);
......@@ -128,7 +128,7 @@ set_location (GClueServiceClient *client,
prev_path = "/";
priv->location = location;
gclue_client_set_location (client, path);
gclue_client_set_location (GCLUE_CLIENT (client), path);
return emit_location_updated (client, prev_path, path, error);
}
......@@ -169,7 +169,8 @@ on_start_ready (GObject *source_object,
if (!set_location (data->client, service_location, path, &error))
goto error_out;
gclue_client_complete_start (data->client, data->invocation);
gclue_client_complete_start (GCLUE_CLIENT (data->client),
data->invocation);
goto out;
error_out:
......@@ -189,8 +190,7 @@ out:
static gboolean
gclue_service_client_handle_start (GClueClient *client,
GDBusMethodInvocation *invocation,
gpointer user_data)
GDBusMethodInvocation *invocation)
{
StartData *data;
......@@ -212,8 +212,7 @@ gclue_service_client_handle_start (GClueClient *client,
static gboolean
gclue_service_client_handle_stop (GClueClient *client,
GDBusMethodInvocation *invocation,
gpointer user_data)
GDBusMethodInvocation *invocation)
{
gclue_client_complete_stop (client, invocation);
......@@ -321,7 +320,7 @@ gclue_service_client_handle_method_call (GDBusConnection *connection,
user_data);
}
static void
static GVariant *
gclue_service_client_handle_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
......@@ -339,21 +338,21 @@ gclue_service_client_handle_get_property (GDBusConnection *connection,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Access denied");
return;
return NULL;
}
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (gclue_service_client_parent_class);
skeleton_vtable = skeleton_class->get_vtable (G_DBUS_INTERFACE_SKELETON (user_data));
skeleton_vtable->get_property (connection,
sender,
object_path,
interface_name,
property_name,
error,
user_data);
return skeleton_vtable->get_property (connection,
sender,
object_path,
interface_name,
property_name,
error,
user_data);
}
static void
static gboolean
gclue_service_client_handle_set_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
......@@ -372,19 +371,19 @@ gclue_service_client_handle_set_property (GDBusConnection *connection,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Access denied");
return;
return FALSE;
}
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (gclue_service_client_parent_class);
skeleton_vtable = skeleton_class->get_vtable (G_DBUS_INTERFACE_SKELETON (user_data));
skeleton_vtable->set_property (connection,
sender,
object_path,
interface_name,
property_name,
variant,
error,
user_data);
return skeleton_vtable->set_property (connection,
sender,
object_path,
interface_name,
property_name,
variant,
error,
user_data);
}
static const GDBusInterfaceVTable gclue_service_client_vtable =
......@@ -501,6 +500,7 @@ gclue_service_client_initable_init (GInitable *initable,
on_name_vanished,
g_object_ref (initable),
g_object_unref);
return TRUE;
}
static void
......
......@@ -71,19 +71,20 @@ gclue_service_location_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GClueServiceLocation *location = GCLUE_SERVICE_LOCATION (object);
GClueServiceLocation *self = GCLUE_SERVICE_LOCATION (object);
GClueLocation *location = GCLUE_LOCATION (object);
switch (prop_id) {
case PROP_PEER:
g_value_set_string (value, location->priv->peer);
g_value_set_string (value, self->priv->peer);
break;
case PROP_PATH:
g_value_set_string (value, location->priv->path);
g_value_set_string (value, self->priv->path);
break;
case PROP_CONNECTION:
g_value_set_object (value, location->priv->connection);
g_value_set_object (value, self->priv->connection);
break;
case PROP_LOCATION:
......@@ -114,19 +115,20 @@ gclue_service_location_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GClueServiceLocation *location = GCLUE_SERVICE_LOCATION (object);
GClueServiceLocation *self = GCLUE_SERVICE_LOCATION (object);
GClueLocation *location = GCLUE_LOCATION (object);
switch (prop_id) {
case PROP_PEER:
location->priv->peer = g_value_dup_string (value);
self->priv->peer = g_value_dup_string (value);
break;
case PROP_PATH:
location->priv->path = g_value_dup_string (value);
self->priv->path = g_value_dup_string (value);
break;
case PROP_CONNECTION:
location->priv->connection = g_value_dup_object (value);
self->priv->connection = g_value_dup_object (value);
break;
case PROP_LOCATION:
......@@ -184,7 +186,7 @@ gclue_service_location_handle_method_call (GDBusConnection *connection,
user_data);
}
static void
static GVariant *
gclue_service_location_handle_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
......@@ -202,21 +204,21 @@ gclue_service_location_handle_get_property (GDBusConnection *connection,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Access denied");
return;
return NULL;
}
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (gclue_service_location_parent_class);
skeleton_vtable = skeleton_class->get_vtable (G_DBUS_INTERFACE_SKELETON (user_data));
skeleton_vtable->get_property (connection,
sender,
object_path,
interface_name,
property_name,
error,
user_data);
return skeleton_vtable->get_property (connection,
sender,
object_path,
interface_name,
property_name,
error,
user_data);
}
static void
static gboolean
gclue_service_location_handle_set_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
......@@ -235,19 +237,19 @@ gclue_service_location_handle_set_property (GDBusConnection *connection,
G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Access denied");
return;
return FALSE;
}
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (gclue_service_location_parent_class);
skeleton_vtable = skeleton_class->get_vtable (G_DBUS_INTERFACE_SKELETON (user_data));
skeleton_vtable->set_property (connection,
sender,
object_path,
interface_name,
property_name,
variant,
error,
user_data);
return skeleton_vtable->set_property (connection,
sender,
object_path,
interface_name,
property_name,
variant,
error,
user_data);
}
static const GDBusInterfaceVTable gclue_service_location_vtable =
......
......@@ -68,10 +68,11 @@ on_peer_vanished (GClueServiceClient *client,
}
static gboolean
gclue_service_manager_handle_get_client (GClueServiceManager *manager,
gclue_service_manager_handle_get_client (GClueManager *manager,
GDBusMethodInvocation *invocation)
{
GClueServiceManagerPrivate *priv = manager->priv;
GClueServiceManager *self = GCLUE_SERVICE_MANAGER (manager);
GClueServiceManagerPrivate *priv = self->priv;
GClueServiceClient *client;
const char *peer;
char *path;
......@@ -85,7 +86,7 @@ gclue_service_manager_handle_get_client (GClueServiceManager *manager,
return TRUE;
}
path = g_strdup_printf ("/org/freedesktop/GeoClue2/Client/%llu",
path = g_strdup_printf ("/org/freedesktop/GeoClue2/Client/%u",
++priv->num_clients);
client = gclue_service_client_new (peer, path, priv->connection, &error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment