aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-21 06:57:19 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-21 06:57:19 +0800
commit093c2a884deae60f0da5e7b26821895b91834b3e (patch)
tree0e7751a2c3c22b78c4624f82477f5b441e4b86d8
parentaa4fd6fd0cc17b936c38b5a4acf80cafa56022b9 (diff)
downloadgsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar.gz
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar.bz2
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar.lz
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar.xz
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.tar.zst
gsoc2013-evolution-093c2a884deae60f0da5e7b26821895b91834b3e.zip
Keep us from reading tmp_tm uninitialized, so purify won't complain.
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. svn path=/trunk/; revision=13831
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-dateedit.c9
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,