aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-10-26 20:15:44 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-10-26 20:15:44 +0800
commit7517f413700c53fb8d6ae7e43957435060fd714f (patch)
treecbdf26199f130fd788bb7bedea41ecc0511683da /calendar
parente48ca861ed32f75ae66aa6efab698635ef2b1cb9 (diff)
downloadgsoc2013-evolution-7517f413700c53fb8d6ae7e43957435060fd714f.tar.gz
gsoc2013-evolution-7517f413700c53fb8d6ae7e43957435060fd714f.tar.zst
gsoc2013-evolution-7517f413700c53fb8d6ae7e43957435060fd714f.zip
Zero out the GnomePilotRecord struct to silence a compiler warning.
2007-10-26 Matthew Barnes <mbarnes@redhat.com> * addressbook/conduit/address-conduit.c (local_record_to_pilot_record): * calendar/conduits/calendar/calendar-conduit.c (local_record_to_pilot_record): * calendar/conduits/memo/memo-conduit.c (local_record_to_pilot_record): * calendar/conduits/todo/todo-conduit.c (local_record_to_pilot_record): Zero out the GnomePilotRecord struct to silence a compiler warning. * calendar/gui/dialogs/memo-page.c (memo_page_select_organizer): Initialize def_address. * calendar/gui/e-itip-control.c: Use unions to avoid strict-aliasing violations. svn path=/trunk/; revision=34434
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c4
-rw-r--r--calendar/conduits/memo/memo-conduit.c2
-rw-r--r--calendar/conduits/todo/todo-conduit.c2
-rw-r--r--calendar/gui/dialogs/memo-page.c2
-rw-r--r--calendar/gui/e-itip-control.c22
6 files changed, 37 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 47bf1028ae..c86934133f 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,16 @@
+2007-10-26 Matthew Barnes <mbarnes@redhat.com>
+
+ * conduits/calendar/calendar-conduit.c (local_record_to_pilot_record):
+ * conduits/memo/memo-conduit.c (local_record_to_pilot_record):
+ * conduits/todo/todo-conduit.c (local_record_to_pilot_record):
+ Zero out the GnomePilotRecord struct to silence a compiler warning.
+
+ * gui/dialogs/memo-page.c (memo_page_select_organizer):
+ Initialize def_address.
+
+ * gui/e-itip-control.c:
+ Use unions to avoid strict-aliasing violations.
+
2007-10-23 Kjartan Maraas <kmaraas@gnome.org>
* gui/alarm-notify/alarm-notify-dialog.c:
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index f423b56254..b37941aafd 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -842,7 +842,9 @@ local_record_to_pilot_record (ECalLocalRecord *local,
g_assert (local->comp != NULL);
g_assert (local->appt != NULL );
-
+
+ memset (&p, 0, sizeof (GnomePilotRecord));
+
p.ID = local->local.ID;
p.category = local->local.category;
p.attr = local->local.attr;
diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c
index 8c43da6a38..74f323987d 100644
--- a/calendar/conduits/memo/memo-conduit.c
+++ b/calendar/conduits/memo/memo-conduit.c
@@ -478,6 +478,8 @@ local_record_to_pilot_record (EMemoLocalRecord *local,
LOG (g_message ( "local_record_to_pilot_record\n" ));
+ memset (&p, 0, sizeof (GnomePilotRecord));
+
p.ID = local->local.ID;
p.category = local->local.category;
p.attr = local->local.attr;
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 7ae7b32d2f..0594d53298 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -619,6 +619,8 @@ local_record_to_pilot_record (EToDoLocalRecord *local,
LOG (g_message ( "local_record_to_pilot_record\n" ));
+ memset (&p, 0, sizeof (GnomePilotRecord));
+
p.ID = local->local.ID;
p.category = local->local.category;
p.attr = local->local.attr;
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 56d422bc18..c1890ee37e 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -1112,7 +1112,7 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address)
MemoPagePrivate *priv;
GList *l;
EAccount *def_account;
- gchar *def_address;
+ gchar *def_address = NULL;
gboolean subscribed_cal = FALSE;
ESource *source = NULL;
const char *user_addr = NULL;
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 651aae31bd..69598568a6 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -72,9 +72,19 @@ struct _EItipControlPrivate {
char action;
gboolean rsvp;
- GtkWidget *ok;
- GtkWidget *hbox;
- GtkWidget *vbox;
+ /* Use the gpointer variants for weak pointers. */
+ union {
+ GtkWidget *ok;
+ gpointer ok_pointer;
+ };
+ union {
+ GtkWidget *hbox;
+ gpointer hbox_pointer;
+ };
+ union {
+ GtkWidget *vbox;
+ gpointer vbox_pointer;
+ };
char *vcalendar;
ECalComponent *comp;
@@ -2200,12 +2210,12 @@ insert_boxes (GtkHTMLEmbedded *eb, EItipControl *itip)
priv = itip->priv;
priv->vbox = gtk_vbox_new (FALSE, 12);
- g_object_add_weak_pointer (G_OBJECT (priv->vbox), (gpointer *) &(priv->vbox));
+ g_object_add_weak_pointer (G_OBJECT (priv->vbox), &priv->vbox_pointer);
gtk_container_add (GTK_CONTAINER (eb), priv->vbox);
gtk_widget_show (priv->vbox);
priv->hbox = gtk_hbox_new (FALSE, 6);
- g_object_add_weak_pointer (G_OBJECT (priv->hbox), (gpointer *) &(priv->hbox));
+ g_object_add_weak_pointer (G_OBJECT (priv->hbox), &priv->hbox_pointer);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->hbox, FALSE, TRUE, 0);
gtk_widget_show (priv->hbox);
@@ -2263,7 +2273,7 @@ insert_ok (GtkWidget *hbox, EItipControl *itip)
priv = itip->priv;
priv->ok = gtk_button_new_from_stock (GTK_STOCK_OK);
- g_object_add_weak_pointer (G_OBJECT (priv->ok), (gpointer *) &(priv->ok) );
+ g_object_add_weak_pointer (G_OBJECT (priv->ok), &priv->ok_pointer);
g_signal_connect (priv->ok, "clicked", G_CALLBACK (ok_clicked_cb), itip);