Blame SOURCES/evolution-3.12.11-coverity-scan.patch

4b6d7b
diff -up evolution-3.12.11/addressbook/gui/widgets/eab-contact-formatter.c.coverity-scan evolution-3.12.11/addressbook/gui/widgets/eab-contact-formatter.c
4b6d7b
--- evolution-3.12.11/addressbook/gui/widgets/eab-contact-formatter.c.coverity-scan	2014-07-17 12:47:57.000000000 +0200
4b6d7b
+++ evolution-3.12.11/addressbook/gui/widgets/eab-contact-formatter.c	2015-05-22 10:25:53.896508227 +0200
4b6d7b
@@ -401,7 +401,7 @@ render_title_block (EABContactFormatter
4b6d7b
 		const gchar *uri = photo->data.uri;
4b6d7b
 		/* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
4b6d7b
 		#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
4b6d7b
-		gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
4b6d7b
+		gchar *unescaped = g_uri_unescape_string (uri, NULL);
4b6d7b
 		uri = unescaped;
4b6d7b
 		#endif
4b6d7b
 		g_string_append_printf (
4b6d7b
@@ -882,7 +882,7 @@ render_compact (EABContactFormatter *for
4b6d7b
 			const gchar *uri = photo->data.uri;
4b6d7b
 			/* WebKit 2.2.x doesn't re-escape URIs, thus do this for versions before and after this */
4b6d7b
 			#if !(WEBKIT_MAJOR_VERSION == 2 && WEBKIT_MINOR_VERSION == 2)
4b6d7b
-			gchar *unescaped = g_uri_unescape_string (photo->data.uri, NULL);
4b6d7b
+			gchar *unescaped = g_uri_unescape_string (uri, NULL);
4b6d7b
 			uri = unescaped;
4b6d7b
 			#endif
4b6d7b
 			g_string_append_printf (
4b6d7b
diff -up evolution-3.12.11/calendar/gui/e-calendar-view.c.coverity-scan evolution-3.12.11/calendar/gui/e-calendar-view.c
4b6d7b
--- evolution-3.12.11/calendar/gui/e-calendar-view.c.coverity-scan	2014-12-09 16:01:59.000000000 +0100
4b6d7b
+++ evolution-3.12.11/calendar/gui/e-calendar-view.c	2015-05-22 10:25:53.897508219 +0200
4b6d7b
@@ -2023,7 +2023,7 @@ e_calendar_view_get_tooltips (const ECal
4b6d7b
 {
4b6d7b
 	GtkWidget *label, *box, *hbox, *ebox, *frame;
4b6d7b
 	const gchar *str;
4b6d7b
-	gchar *tmp, *tmp1, *tmp2;
4b6d7b
+	gchar *tmp, *tmp1 = NULL, *tmp2 = NULL;
4b6d7b
 	ECalComponentOrganizer organiser;
4b6d7b
 	ECalComponentDateTime dtstart, dtend;
4b6d7b
 	icalcomponent *clone_comp;
4b6d7b
@@ -2181,6 +2181,8 @@ e_calendar_view_get_tooltips (const ECal
4b6d7b
 			tmp = tmp2;
4b6d7b
 			tmp2 = NULL;
4b6d7b
 		}
4b6d7b
+	} else {
4b6d7b
+		tmp = NULL;
4b6d7b
 	}
4b6d7b
 
4b6d7b
 	e_cal_component_free_datetime (&dtstart);
4b6d7b
diff -up evolution-3.12.11/calendar/gui/e-day-view.c.coverity-scan evolution-3.12.11/calendar/gui/e-day-view.c
4b6d7b
--- evolution-3.12.11/calendar/gui/e-day-view.c.coverity-scan	2014-12-22 16:05:29.000000000 +0100
4b6d7b
+++ evolution-3.12.11/calendar/gui/e-day-view.c	2015-05-22 10:25:53.898508211 +0200
4b6d7b
@@ -603,6 +603,8 @@ e_day_view_get_text_color (EDayView *day
4b6d7b
 		color.blue = 65535.0f;
4b6d7b
 	}
4b6d7b
 
4b6d7b
+	color.pixel = 0;
4b6d7b
+
4b6d7b
 	return color;
4b6d7b
 }
4b6d7b
 
4b6d7b
diff -up evolution-3.12.11/e-util/e-cell-date-edit.c.coverity-scan evolution-3.12.11/e-util/e-cell-date-edit.c
4b6d7b
--- evolution-3.12.11/e-util/e-cell-date-edit.c.coverity-scan	2014-04-24 19:00:26.000000000 +0200
4b6d7b
+++ evolution-3.12.11/e-util/e-cell-date-edit.c	2015-05-22 10:25:53.898508211 +0200
4b6d7b
@@ -960,8 +960,8 @@ e_cell_date_edit_update_cell (ECellDateE
4b6d7b
 			ecell_text, ecv->e_table_model,
4b6d7b
 			ecol->spec->model_col, ecp->popup_row, text);
4b6d7b
 		e_cell_leave_edit (
4b6d7b
-			ecv, ecp->popup_view_col,
4b6d7b
-			ecol->spec->model_col, ecp->popup_row, NULL);
4b6d7b
+			ecv, ecol->spec->model_col,
4b6d7b
+			ecp->popup_view_col, ecp->popup_row, NULL);
4b6d7b
 	}
4b6d7b
 
4b6d7b
 	e_cell_text_free_text (ecell_text, ecv->e_table_model,
4b6d7b
diff -up evolution-3.12.11/e-util/e-filter-input.c.coverity-scan evolution-3.12.11/e-util/e-filter-input.c
4b6d7b
--- evolution-3.12.11/e-util/e-filter-input.c.coverity-scan	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-filter-input.c	2015-05-22 10:25:53.898508211 +0200
4b6d7b
@@ -107,7 +107,7 @@ filter_input_validate (EFilterElement *e
4b6d7b
 
4b6d7b
 		regfree (&regexpat);
4b6d7b
 	} else if (!input->allow_empty && (!input->values || !input->values->next)) {
4b6d7b
-		const gchar *value = input->values->data;
4b6d7b
+		const gchar *value = input->values ? input->values->data : NULL;
4b6d7b
 		gboolean is_empty = value == NULL;
4b6d7b
 
4b6d7b
 		if (value) {
4b6d7b
diff -up evolution-3.12.11/e-util/e-focus-tracker.c.coverity-scan evolution-3.12.11/e-util/e-focus-tracker.c
4b6d7b
--- evolution-3.12.11/e-util/e-focus-tracker.c.coverity-scan	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-focus-tracker.c	2015-05-22 10:25:53.899508203 +0200
4b6d7b
@@ -1133,9 +1133,9 @@ e_focus_tracker_paste_clipboard (EFocusT
4b6d7b
 
4b6d7b
 	} else if (GTK_IS_TEXT_VIEW (focus)) {
4b6d7b
 		GtkClipboard *clipboard;
4b6d7b
-		GtkTextView *text_view = GTK_TEXT_VIEW (focus);
4b6d7b
-		GtkTextBuffer *buffer = gtk_text_view_get_buffer (text_view);
4b6d7b
-		gboolean is_editable = gtk_text_view_get_editable (text_view);
4b6d7b
+		GtkTextView *text_view;
4b6d7b
+		GtkTextBuffer *buffer;
4b6d7b
+		gboolean is_editable;
4b6d7b
 
4b6d7b
 		clipboard = gtk_widget_get_clipboard (
4b6d7b
 			focus, GDK_SELECTION_CLIPBOARD);
4b6d7b
diff -up evolution-3.12.11/e-util/e-table-sort-info.c.coverity-scan evolution-3.12.11/e-util/e-table-sort-info.c
4b6d7b
--- evolution-3.12.11/e-util/e-table-sort-info.c.coverity-scan	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/e-util/e-table-sort-info.c	2015-05-22 10:25:53.899508203 +0200
4b6d7b
@@ -854,7 +854,7 @@ e_table_sort_info_save_to_node (ETableSo
4b6d7b
 
4b6d7b
 	for (ii = 0; ii < group_count; ii++) {
4b6d7b
 		ETableColumnSpecification *column_spec;
4b6d7b
-		GtkSortType sort_type;
4b6d7b
+		GtkSortType sort_type = GTK_SORT_ASCENDING;
4b6d7b
 		xmlNode *new_node;
4b6d7b
 		gint index;
4b6d7b
 
4b6d7b
@@ -881,7 +881,7 @@ e_table_sort_info_save_to_node (ETableSo
4b6d7b
 
4b6d7b
 	for (ii = 0; ii < sort_count; ii++) {
4b6d7b
 		ETableColumnSpecification *column_spec;
4b6d7b
-		GtkSortType sort_type;
4b6d7b
+		GtkSortType sort_type = GTK_SORT_ASCENDING;
4b6d7b
 		xmlNode *new_node;
4b6d7b
 		gint index;
4b6d7b
 
4b6d7b
diff -up evolution-3.12.11/mail/e-mail-reader-utils.c.coverity-scan evolution-3.12.11/mail/e-mail-reader-utils.c
4b6d7b
--- evolution-3.12.11/mail/e-mail-reader-utils.c.coverity-scan	2014-12-12 13:46:11.000000000 +0100
4b6d7b
+++ evolution-3.12.11/mail/e-mail-reader-utils.c	2015-05-22 10:25:53.899508203 +0200
4b6d7b
@@ -970,6 +970,7 @@ mail_reader_print_parse_message_cb (GObj
4b6d7b
 	if (local_error) {
4b6d7b
 		g_warn_if_fail (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED));
4b6d7b
 
4b6d7b
+		/* coverity[check_return] */
4b6d7b
 		e_activity_handle_cancellation (activity, local_error);
4b6d7b
 		g_clear_error (&local_error);
4b6d7b
 		async_context_free (async_context);
4b6d7b
diff -up evolution-3.12.11/mail/em-folder-tree.c.coverity-scan evolution-3.12.11/mail/em-folder-tree.c
4b6d7b
--- evolution-3.12.11/mail/em-folder-tree.c.coverity-scan	2014-06-17 10:10:00.000000000 +0200
4b6d7b
+++ evolution-3.12.11/mail/em-folder-tree.c	2015-05-22 10:25:53.900508195 +0200
4b6d7b
@@ -1950,7 +1950,7 @@ tree_drag_data_get (GtkWidget *widget,
4b6d7b
 	GtkTreeModel *model;
4b6d7b
 	GtkTreePath *src_path;
4b6d7b
 	CamelFolder *folder;
4b6d7b
-	CamelStore *store;
4b6d7b
+	CamelStore *store = NULL;
4b6d7b
 	GtkTreeIter iter;
4b6d7b
 	gchar *folder_name = NULL;
4b6d7b
 	gchar *folder_uri;
4b6d7b
diff -up evolution-3.12.11/mail/em-folder-tree-model.c.coverity-scan evolution-3.12.11/mail/em-folder-tree-model.c
4b6d7b
--- evolution-3.12.11/mail/em-folder-tree-model.c.coverity-scan	2014-07-17 12:48:16.000000000 +0200
4b6d7b
+++ evolution-3.12.11/mail/em-folder-tree-model.c	2015-05-22 10:25:53.900508195 +0200
4b6d7b
@@ -1480,7 +1480,7 @@ folder_tree_model_update_status_icon (St
4b6d7b
 	GtkTreePath *path;
4b6d7b
 	GtkTreeIter iter;
4b6d7b
 	GIcon *icon = NULL;
4b6d7b
-	const gchar *icon_name;
4b6d7b
+	const gchar *icon_name = NULL;
4b6d7b
 	gboolean was_connecting;
4b6d7b
 	gboolean host_reachable;
4b6d7b
 
4b6d7b
diff -up evolution-3.12.11/mail/message-list.c.coverity-scan evolution-3.12.11/mail/message-list.c
4b6d7b
--- evolution-3.12.11/mail/message-list.c.coverity-scan	2015-02-04 08:07:15.000000000 +0100
4b6d7b
+++ evolution-3.12.11/mail/message-list.c	2015-05-22 10:25:53.901508186 +0200
4b6d7b
@@ -3027,7 +3027,7 @@ message_list_duplicate_value (ETreeModel
4b6d7b
 
4b6d7b
 				return res;
4b6d7b
 			} else
4b6d7b
-				return value;
4b6d7b
+				return NULL;
4b6d7b
 
4b6d7b
 		default:
4b6d7b
 			g_return_val_if_reached (NULL);
4b6d7b
diff -up evolution-3.12.11/mail/test-mail-autoconfig.c.coverity-scan evolution-3.12.11/mail/test-mail-autoconfig.c
4b6d7b
--- evolution-3.12.11/mail/test-mail-autoconfig.c.coverity-scan	2014-03-24 10:25:23.000000000 +0100
4b6d7b
+++ evolution-3.12.11/mail/test-mail-autoconfig.c	2015-05-22 10:25:53.901508186 +0200
4b6d7b
@@ -39,6 +39,8 @@ main (gint argc,
4b6d7b
 		autoconfig = e_mail_autoconfig_new_sync (
4b6d7b
 			registry, argv[1], NULL, &error);
4b6d7b
 		g_object_unref (registry);
4b6d7b
+	} else {
4b6d7b
+		autoconfig = NULL;
4b6d7b
 	}
4b6d7b
 
4b6d7b
 	/* Sanity check. */