From 093c2a884deae60f0da5e7b26821895b91834b3e Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Sat, 20 Oct 2001 22:57:19 +0000 Subject: Keep us from reading tmp_tm uninitialized, so purify won't complain. 2001-10-20 Jon Trowbridge * e-dateedit.c (e_date_edit_check_date_changed): Keep us from reading tmp_tm uninitialized, so purify won't complain. svn path=/trunk/; revision=13831 --- widgets/misc/ChangeLog | 5 +++++ widgets/misc/e-dateedit.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 3f00ca133a..32daa5b163 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,8 @@ +2001-10-20 Jon Trowbridge + + * e-dateedit.c (e_date_edit_check_date_changed): Keep us from + reading tmp_tm uninitialized, so purify won't complain. + 2001-10-09 Jeffrey Stedfast * e-charset-picker.c (e_charset_picker_bonobo_ui_populate): Now diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 2b46881135..86cee024e2 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -1681,15 +1681,20 @@ e_date_edit_check_date_changed (EDateEdit *dedit) EDateEditPrivate *priv; gchar *date_text; struct tm tmp_tm; - gboolean none = FALSE, valid = TRUE, date_changed; + gboolean none = FALSE, valid = TRUE, date_changed = FALSE; priv = dedit->priv; date_text = gtk_entry_get_text (GTK_ENTRY (priv->date_entry)); if (field_set_to_none (date_text)) none = TRUE; - else if (!e_date_edit_parse_date (dedit, date_text, &tmp_tm)) + else if (!e_date_edit_parse_date (dedit, date_text, &tmp_tm)) { valid = FALSE; + tmp_tm.tm_year = 0; + tmp_tm.tm_mon = 0; + tmp_tm.tm_mday = 0; + } + date_changed = e_date_edit_set_date_internal (dedit, valid, none, tmp_tm.tm_year, -- cgit