SVN commit 451025 by kainhofe:

ARRRGGH! Just when we release kde 3.4.2, a nasty bug in connection with gcc 4.0 
(NOT with 3.3.x, which I use) creeps up:
It seems that gcc 4.0 is no longer initializing all members of a struct, while 
gcc 3.3.x obviously did something like that. So we can't simply take a new 
icaltime structure, since its member will be initialized with random values in 
gcc 4.0. So everything that later on checks the members of the struct will work 
on uninitialized values! Rather, we need to use a null time (all fields 
initialized to 0) and set all necessary fields later on. 
This fixes the end date corruption (only of all-day events) that vanRijn and 
and Will are observing with their gcc 4.0-compiled kdepim.

If any distribution is using kde 3.4.2 compiled with gcc 4.0, I suppose this 
fix needs to go in!

(Backport of commit 451010 from the 3.5 branch)

CCMAIL: [email protected]



 M  +2 -2      icalformatimpl.cpp  


--- branches/KDE/3.4/kdepim/libkcal/icalformatimpl.cpp #451024:451025
@@ -2107,7 +2107,7 @@
 
 icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
 {
-  icaltimetype t;
+  icaltimetype t = icaltime_null_time();
 
   t.year = date.year();
   t.month = date.month();
@@ -2128,7 +2128,7 @@
 
 icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime)
 {
-  icaltimetype t;
+  icaltimetype t = icaltime_null_time();
 
   t.year = datetime.date().year();
   t.month = datetime.date().month();


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to