From b32649a94cd485f742d2ad5f1b76d7385393e137 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 10 Oct 2007 04:54:36 +0000 Subject: ** Fixes bug #437579 2007-10-09 Matthew Barnes ** Fixes bug #437579 * addressbook/conduit/address-conduit.c: * addressbook/gui/component/addressbook-config.c: * addressbook/gui/contact-editor/e-contact-editor.c: * addressbook/gui/widgets/eab-gui-util.c: * calendar/conduits/calendar/calendar-conduit.c: * calendar/conduits/memo/memo-conduit.c: * calendar/conduits/todo/todo-conduit.c: * calendar/gui/dialogs/alarm-dialog.c: * calendar/gui/dialogs/event-page.c: * calendar/gui/dialogs/memo-page.c: * calendar/gui/dialogs/task-page.c: * calendar/gui/e-day-view-layout.c: * calendar/gui/e-day-view-layout.h: * calendar/gui/print.c: * e-util/e-pilot-map.c: * e-util/e-plugin.c: * e-util/e-profile-event.c: * e-util/e-signature.c: * filter/filter-file.c: * mail/e-searching-tokenizer.c: * mail/em-folder-browser.c: * mail/em-format-html.c: * mail/em-format-view.c: * mail/em-format.c: * mail/em-mailer-prefs.c: * mail/em-mailer-prefs.h: * mail/mail-session.c: * mail/mail-session.h: * mail/mail-vfolder.c: * mail/message-list.c: * plugins/bbdb/bbdb.c: * plugins/bbdb/gaimbuddies.c: * plugins/calendar-http/calendar-http.c: * plugins/exchange-operations/exchange-user-dialog.c: * plugins/face/face.c: * shell/e-shell-window.c: * shell/e-shell.c: * smime/lib/e-cert-db.c: * tools/killev.c: * widgets/misc/e-cursors.c: * widgets/misc/e-spinner.c: * widgets/misc/e-unicode.c: * widgets/table/e-table-field-chooser-item.c: * widgets/table/e-table-header-item.c: * widgets/table/e-table-header-item.h: * widgets/table/e-table-header-utils.c: * widgets/table/e-table.c: * widgets/text/e-text.c: Fix various compiler warnings. Patch from Milan Crha. svn path=/trunk/; revision=34368 --- addressbook/ChangeLog | 10 ++++++++++ addressbook/conduit/address-conduit.c | 6 ++++-- addressbook/gui/component/addressbook-config.c | 10 +++++----- addressbook/gui/contact-editor/e-contact-editor.c | 9 +++++++-- addressbook/gui/widgets/eab-gui-util.c | 2 -- 5 files changed, 26 insertions(+), 11 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index ecb0822768..74d9aedd33 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,13 @@ +2007-10-09 Matthew Barnes + + ** Fixes part of bug #437579 + + * conduit/address-conduit.c: + * gui/contact-editor/e-contact-editor.c: + * gui/component/addressbook-config.c: + * gui/widgets/eab-gui-util.c: + Fix various compiler warnings. Patch from Milan Crha. + 2007-10-04 Matthew Barnes ** Fixes part of bug #477045 diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index ff6fa1d5b1..97cb92d145 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -806,9 +806,10 @@ local_record_to_pilot_record (EAddrLocalRecord *local, EAddrConduitContext *ctxt) { GnomePilotRecord p; - static char record[0xffff]; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; +#else + static char record[0xffff]; #endif g_assert (local->addr != NULL ); @@ -1283,13 +1284,14 @@ pre_sync (GnomePilotConduit *conduit, EBookQuery *query; GList *l; int len; - unsigned char *buf; char *filename; char *change_id; char *auth; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 pi_buffer_t *buffer; +#else + unsigned char *buf; #endif abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit); diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 1ea318e560..c40a32ce0a 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -396,7 +396,7 @@ static void query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) { GtkTreeSelection *selection; - GtkListStore *model; + GtkTreeModel *model; GtkTreeView *table; GtkWidget *dialog; GtkWidget *supported_bases_table; @@ -423,19 +423,19 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) gtk_widget_show_all (supported_bases_table); table = g_object_get_data (G_OBJECT (supported_bases_table), "table"); - model = GTK_LIST_STORE (gtk_tree_view_get_model(table)); + model = gtk_tree_view_get_model (table); selection = gtk_tree_view_get_selection (table); g_signal_connect (selection, "changed", G_CALLBACK (search_base_selection_model_changed), dialog); search_base_selection_model_changed (selection, dialog); - if (do_ldap_root_dse_query (sdialog, model, sdialog->source)) { + if (do_ldap_root_dse_query (sdialog, GTK_LIST_STORE (model), sdialog->source)) { gtk_widget_show (dialog); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK - && gtk_tree_selection_get_selected(selection, (GtkTreeModel **)&model, &iter)) { + && gtk_tree_selection_get_selected (selection, &model, &iter)) { char *dn; - gtk_tree_model_get ((GtkTreeModel *)model, &iter, 0, &dn, -1); + gtk_tree_model_get (model, &iter, 0, &dn, -1); gtk_entry_set_text((GtkEntry *)sdialog->rootdn, dn); g_free(dn); } diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 212225b3e5..6bbc80e9bb 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2260,12 +2260,15 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) photo.data.inlined.mime_type = NULL; if (editor->image_changed) { + gchar *img_buff = NULL; if (editor->image_set && e_image_chooser_get_image_data (E_IMAGE_CHOOSER (widget), - (char **)&photo.data.inlined.data, &photo.data.inlined.length)) { + &img_buff, &photo.data.inlined.length)) { GdkPixbuf *pixbuf, *new; GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); + photo.data.inlined.data = (unsigned char *)img_buff; + img_buff = NULL; gdk_pixbuf_loader_write (loader, photo.data.inlined.data, photo.data.inlined.length, NULL); gdk_pixbuf_loader_close (loader, NULL); @@ -2295,9 +2298,11 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader); gchar *format_name = gdk_pixbuf_format_get_name (format); g_free(photo.data.inlined.data); - gdk_pixbuf_save_to_buffer (new, (gchar **)&(photo.data.inlined.data), + gdk_pixbuf_save_to_buffer (new, &img_buff, &photo.data.inlined.length, format_name, NULL, NULL); + photo.data.inlined.data = (unsigned char *)img_buff; + img_buff = NULL; g_free (format_name); g_object_unref (new); } diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index e3c23c0105..dba4653f87 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -505,7 +505,6 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window) GtkWidget *filesel; char *file; char *name; - char *full_filename; SaveAsInfo *info = g_new(SaveAsInfo, 1); name = e_contact_get (contact, E_CONTACT_FILE_AS); @@ -548,7 +547,6 @@ eab_contact_list_save (char *title, GList *list, GtkWindow *parent_window) GtkWidget *filesel; SaveAsInfo *info = g_new(SaveAsInfo, 1); char *file; - char *full_filename; filesel = gtk_file_chooser_dialog_new (title, parent_window, -- cgit v1.2.3