month-view: initialize variable
Some compilers seem to be over-pessimistic and abort the build with:
gcal-month-view.c: In function 'gcal_month_view_drag_drop':
gcal-month-view.c:908:32: error: 'timespan' may be used uninitialized in this function [-Werror=maybe-uninitialized]
GDateTime *new_end = g_date_time_add (new_start, timespan);
Even though the usage of the variable is guarded by an equal if as the assignment
https://bugzilla.gnome.org/show_bug.cgi?id=770667
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
faf61122fd
commit
1b90c8b413
@@ -865,7 +865,7 @@ gcal_month_view_drag_drop (GtkWidget *widget,
|
||||
gint cell, diff;
|
||||
gint start_month, current_month;
|
||||
gint start_year, current_year;
|
||||
GTimeSpan timespan;
|
||||
GTimeSpan timespan = 0;
|
||||
|
||||
cell = get_dnd_cell (widget, x, y);
|
||||
event_widget = gtk_drag_get_source_widget (context);
|
||||
|
||||
Reference in New Issue
Block a user