[gcr] gcr: Build fixes
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr] gcr: Build fixes
- Date: Mon, 19 Dec 2011 07:35:14 +0000 (UTC)
commit c145132df840a498cb64a6423af5c30acc3f3b1e
Author: Stef Walter <stefw collabora co uk>
Date: Mon Dec 19 08:32:19 2011 +0100
gcr: Build fixes
gcr/Makefile.am | 2 +-
gcr/gcr-mock-prompter.c | 13 +++++++------
gcr/gcr-system-prompter.c | 4 ++++
3 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index 79ca5d2..83d56d2 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -426,7 +426,7 @@ EXTRA_DIST = \
$(desktop_in_in_files) \
$(desktop_in_files) \
$(desktop_DATA) \
- $(service_in_files ) \
+ $(service_in_files) \
$(mime_DATA)
CLEANFILES = \
diff --git a/gcr/gcr-mock-prompter.c b/gcr/gcr-mock-prompter.c
index acd660f..9dbe780 100644
--- a/gcr/gcr-mock-prompter.c
+++ b/gcr/gcr-mock-prompter.c
@@ -825,7 +825,7 @@ static gpointer
mock_prompter_thread (gpointer data)
{
ThreadData *thread_data = data;
- GDBusConnection *connection;
+ GDBusConnection *connection = NULL;
GMainContext *context;
GError *error = NULL;
GSource *idle;
@@ -879,13 +879,14 @@ mock_prompter_thread (gpointer data)
g_object_unref (thread_data->prompter);
thread_data->prompter = NULL;
- if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
- g_critical ("connection flush failed: %s", error->message);
- g_error_free (error);
+ if (connection) {
+ if (!g_dbus_connection_flush_sync (connection, NULL, &error)) {
+ g_critical ("connection flush failed: %s", error->message);
+ g_error_free (error);
+ }
+ g_object_unref (connection);
}
- g_object_unref (connection);
-
while (g_main_context_iteration (context, FALSE));
g_main_context_unref (context);
diff --git a/gcr/gcr-system-prompter.c b/gcr/gcr-system-prompter.c
index 2be9040..82195f7 100644
--- a/gcr/gcr-system-prompter.c
+++ b/gcr/gcr-system-prompter.c
@@ -734,6 +734,10 @@ on_prompt_confirm (GObject *source,
case GCR_PROMPT_REPLY_CANCEL:
response = GCR_DBUS_PROMPT_REPLY_NO;
break;
+ default:
+ response = GCR_DBUS_PROMPT_REPLY_NONE;
+ g_warn_if_reached ();
+ break;
}
prompt_send_ready (active, response, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]