diff options
-rw-r--r-- | widgets/misc/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/misc/e-dateedit.c | 9 |
2 files changed, 12 insertions, 2 deletions
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 <trow@ximian.com> + + * 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 <fejj@ximian.com> * 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, |