diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-15 23:16:25 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-16 10:50:05 +0800 |
commit | cae22334fa6bc395ccc421b09e0af94c89297c41 (patch) | |
tree | 84881f467c0448db044d8bb3533e044a7152bb2b /addressbook | |
parent | d37784ed3db20fd74ea4b8d9fdfe58518370cea2 (diff) | |
download | gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.gz gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.bz2 gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.lz gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.xz gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.zst gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.zip |
Remove dead assignments found by clang.
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/conduit/address-conduit.c | 8 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 10 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 1 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-contact-display.c | 12 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 3 | ||||
-rw-r--r-- | addressbook/importers/evolution-csv-importer.c | 7 | ||||
-rw-r--r-- | addressbook/printing/e-contact-print.c | 6 | ||||
-rw-r--r-- | addressbook/util/eab-book-util.c | 2 |
9 files changed, 6 insertions, 49 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 3c2436dc27..73fb68b0ee 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -1147,7 +1147,6 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui { EContactAddress *address = NULL; gint phone = entryPhone1; - EContactField field; gboolean syncable; gint i; @@ -1222,9 +1221,10 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE), ctxt->pilot_charset); /* See if the default has something in it */ - if ((address = e_contact_get (contact, ctxt->cfg->default_address))) { - field = ctxt->cfg->default_address; - } else { + address = e_contact_get (contact, ctxt->cfg->default_address); + if (address == NULL) { + EContactField field; + /* Try to find a non-empty address field */ for (field = E_CONTACT_FIRST_ADDRESS_ID; field <= E_CONTACT_LAST_ADDRESS_ID; field++) { if ((address = e_contact_get (contact, field))) diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 18495d59c9..0b0c71711d 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -512,11 +512,8 @@ contact_list_editor_drag_drop_cb (GtkWidget *widget, gint x, gint y, guint time) { - EContactListEditor *editor; GList *iter; - editor = contact_list_editor_extract (widget); - for (iter = context->targets; iter != NULL; iter = iter->next) { GdkAtom target = GDK_POINTER_TO_ATOM (iter->data); gchar *possible_type; @@ -547,11 +544,8 @@ contact_list_editor_drag_motion_cb (GtkWidget *widget, gint x, gint y, guint time) { - EContactListEditor *editor; GList *iter; - editor = contact_list_editor_extract (widget); - for (iter = context->targets; iter != NULL; iter = iter->next) { GdkAtom target = GDK_POINTER_TO_ATOM (iter->data); gchar *possible_type; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index bcf6ed6277..cc540c14c3 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1252,7 +1252,6 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) ETable *etable = NULL; EAddressbookModel *model; EBook *book; - EMinicardView *card_view; ESelectionModel *selection_model = NULL; GalViewInstance *view_instance; GalView *gal_view; @@ -1280,8 +1279,6 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) widget = gtk_bin_get_child (GTK_BIN (view)); if (GAL_IS_VIEW_MINICARD (gal_view)) { - card_view = e_minicard_view_widget_get_view ( - E_MINICARD_VIEW_WIDGET (view->priv->object)); selection_model = e_addressbook_view_get_selection_model (view); row = e_selection_model_cursor_row (selection_model); } @@ -1363,19 +1360,12 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) void e_addressbook_view_view (EAddressbookView *view) { - EAddressbookModel *model; - EBook *book; GList *list, *iter; - gboolean editable; gint response; guint length; g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (view)); - model = e_addressbook_view_get_model (view); - book = e_addressbook_model_get_book (model); - editable = e_addressbook_model_get_editable (model); - list = e_addressbook_view_get_selected (view); length = g_list_length (list); response = GTK_RESPONSE_YES; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index a3d7e3aad4..04bf9757e4 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -983,7 +983,6 @@ remodel( EMinicard *e_minicard ) count = 5; else count = count + g_list_length (email); - is_email=FALSE; g_list_free (email); } else { string = e_contact_get(e_minicard->contact, field); diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 84f7cba538..dda6081137 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -916,17 +916,6 @@ contact_display_dispose (GObject *object) } static void -contact_display_finalize (GObject *object) -{ - EABContactDisplayPrivate *priv; - - priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (object); - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void contact_display_url_requested (GtkHTML *html, const gchar *uri, GtkHTMLStream *handle) @@ -1094,7 +1083,6 @@ eab_contact_display_class_init (EABContactDisplayClass *class) object_class->set_property = contact_display_set_property; object_class->get_property = contact_display_get_property; object_class->dispose = contact_display_dispose; - object_class->finalize = contact_display_finalize; html_class = GTK_HTML_CLASS (class); html_class->url_requested = contact_display_url_requested; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 4f84eed6e4..31d05d278c 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -233,7 +233,6 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select ESourceList *source_list; GtkWidget *dialog; GtkWidget *ok_button; - GtkWidget *cancel_button; /* GtkWidget *label; */ GtkWidget *selector; GtkWidget *scrolled_window; @@ -247,7 +246,7 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 300); - cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive (ok_button, FALSE); diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 81dc9b6dac..6a12d7075a 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -298,18 +298,11 @@ static EContactDate* date_from_string (const gchar *str) { EContactDate* date; - gint length; - gchar *t; gint i = 0; g_return_val_if_fail (str != NULL, NULL); date = e_contact_date_new(); - /* ignore time part */ - if ((t = strchr (str, 'T')) != NULL) - length = t - str; - else - length = strlen(str); if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) { date->month = str[i] * 10 + str[i+1] - '0' * 11; diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 07b13d2122..fb135baa23 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -211,12 +211,6 @@ e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *letter) static void e_contact_start_new_page (EContactPrintContext *ctxt) { - cairo_t *cr; - - cr = gtk_print_context_get_cairo_context (ctxt->context); - - /*cairo_show_page (cr);*/ - ctxt->x = ctxt->y = .0; ctxt->column = 0; ctxt->pages++; diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 84529c9214..6975143bd1 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -214,7 +214,7 @@ eab_contact_list_from_string (const gchar *str) p++; } - q = p = str_stripped = g_string_free (gstr, FALSE); + p = str_stripped = g_string_free (gstr, FALSE); /* Note: The vCard standard says * |