[gnome-online-accounts] Bug 652575 — Fix some compilation warnings
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] Bug 652575 — Fix some compilation warnings
- Date: Tue, 14 Jun 2011 16:10:01 +0000 (UTC)
commit abff92fc0c9586fa395734bf65c3af4e54bcbec0
Author: Philip Withnall <philip tecnocode co uk>
Date: Tue Jun 14 16:38:04 2011 +0100
Bug 652575 â?? Fix some compilation warnings
src/daemon/goadaemon.c | 2 --
src/goabackend/goaeditablelabel.c | 10 ++++++----
src/goabackend/goalogging.c | 3 ++-
src/panel/goapanel.c | 3 ++-
src/panel/goapanelaccountsmodel.c | 4 +++-
5 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 6577cc9..e944dcc 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -555,7 +555,6 @@ process_config_entries (GoaDaemon *daemon,
const gchar *object_path = l->data;
GoaObjectSkeleton *object;
gchar *group;
- KeyFileData *key_file_data;
goa_debug ("adding %s", object_path);
@@ -593,7 +592,6 @@ process_config_entries (GoaDaemon *daemon,
const gchar *object_path = l->data;
GoaObject *object;
gchar *group;
- KeyFileData *key_file_data;
goa_debug ("unchanged %s", object_path);
diff --git a/src/goabackend/goaeditablelabel.c b/src/goabackend/goaeditablelabel.c
index 237b38b..847d104 100644
--- a/src/goabackend/goaeditablelabel.c
+++ b/src/goabackend/goaeditablelabel.c
@@ -68,6 +68,7 @@ goa_editable_label_set_text (GoaEditableLabel *e,
{
GoaEditableLabelPrivate *priv;
gchar *tmp;
+ const gchar *label_text;
GtkWidget *label;
priv = e->priv;
@@ -78,12 +79,13 @@ goa_editable_label_set_text (GoaEditableLabel *e,
gtk_entry_set_text (priv->entry, tmp);
- if (tmp == NULL || tmp[0] == '\0')
- tmp = EMPTY_TEXT;
+ label_text = tmp;
+ if (label_text == NULL || label_text[0] == '\0')
+ label_text = EMPTY_TEXT;
- gtk_label_set_text (priv->label, tmp);
+ gtk_label_set_text (priv->label, label_text);
label = gtk_bin_get_child (GTK_BIN (priv->button));
- gtk_label_set_text (GTK_LABEL (label), tmp);
+ gtk_label_set_text (GTK_LABEL (label), label_text);
g_object_notify (G_OBJECT (e), "text");
}
diff --git a/src/goabackend/goalogging.c b/src/goabackend/goalogging.c
index 5404322..89657bf 100644
--- a/src/goabackend/goalogging.c
+++ b/src/goabackend/goalogging.c
@@ -149,6 +149,7 @@ goa_log (GoaLogLevel level,
const gchar *level_color_str;
gint syslog_priority;
static gboolean have_called_openlog = FALSE;
+ gchar *thread_str;
va_start (var_args, format);
message = g_strdup_vprintf (format, var_args);
@@ -205,7 +206,7 @@ goa_log (GoaLogLevel level,
g_assert_not_reached ();
break;
}
- gchar *thread_str;
+
thread_str = g_strdup_printf ("%d", (gint) syscall (SYS_gettid));
g_print ("%s%s%s.%03d:%s%s%s[%s]%s:%s%s%s:%s %s %s[%s, %s()]%s\n",
_color_get (_COLOR_BOLD_ON), _color_get (_COLOR_FG_YELLOW), time_buf, (gint) now.tv_usec / 1000, _color_get (_COLOR_RESET),
diff --git a/src/panel/goapanel.c b/src/panel/goapanel.c
index 51abddb..61c721f 100644
--- a/src/panel/goapanel.c
+++ b/src/panel/goapanel.c
@@ -469,8 +469,9 @@ on_toolbar_add_button_clicked (GtkToolButton *button,
providers = goa_provider_get_all ();
for (l = providers; l != NULL; l = l->next)
{
- GoaProvider *provider = GOA_PROVIDER (l->data);
gchar *provider_name;
+
+ provider = GOA_PROVIDER (l->data);
provider_name = goa_provider_get_provider_name (provider, NULL);
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo_box),
goa_provider_get_provider_type (provider),
diff --git a/src/panel/goapanelaccountsmodel.c b/src/panel/goapanelaccountsmodel.c
index 48f8fb4..47aa20b 100644
--- a/src/panel/goapanelaccountsmodel.c
+++ b/src/panel/goapanelaccountsmodel.c
@@ -133,12 +133,14 @@ goa_panel_accounts_model_constructed (GObject *object)
GoaPanelAccountsModel *model = GOA_PANEL_ACCOUNTS_MODEL (object);
GType types[GOA_PANEL_ACCOUNTS_MODEL_N_COLUMNS];
+ G_STATIC_ASSERT (5 == GOA_PANEL_ACCOUNTS_MODEL_N_COLUMNS);
+
types[0] = G_TYPE_STRING;
types[1] = GOA_TYPE_OBJECT;
types[2] = G_TYPE_BOOLEAN;
types[3] = G_TYPE_STRING;
types[4] = G_TYPE_ICON;
- G_STATIC_ASSERT (5 == GOA_PANEL_ACCOUNTS_MODEL_N_COLUMNS);
+
gtk_list_store_set_column_types (GTK_LIST_STORE (model),
GOA_PANEL_ACCOUNTS_MODEL_N_COLUMNS,
types);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]