[gnome-calendar] month-view: initialize variable
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: initialize variable
- Date: Wed, 31 Aug 2016 20:16:30 +0000 (UTC)
commit 1b90c8b413286b3b8f841ee2090b5e0230d3641b
Author: Dominique Leuenberger <dimstar opensuse org>
Date: Wed Aug 31 19:58:14 2016 +0200
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
src/gcal-month-view.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 36f23a4..bb8fde2 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]