openbsd-ports/textproc/libical/patches/patch-src_libical_icalrecur_c
2010-09-07 10:38:40 +00:00

40 lines
1.4 KiB
Plaintext

$OpenBSD: patch-src_libical_icalrecur_c,v 1.1 2010/09/07 10:38:40 jasper Exp $
Fix build with gcc2.
--- src/libical/icalrecur.c.orig Mon Sep 6 09:16:29 2010
+++ src/libical/icalrecur.c Mon Sep 6 14:14:53 2010
@@ -1593,10 +1593,11 @@ static int next_month(icalrecur_iterator* impl)
int day;
int days_in_month = icaltime_days_in_month(impl->last.month,
impl->last.year);
- assert( BYDAYPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX);
-
int set_pos_counter = 0;
int set_pos_total = 0;
+ int found = 0;
+
+ assert( BYDAYPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX);
/* Count the past positions for the BYSETPOS calculation */
if(has_by_data(impl,BY_SET_POS)){
@@ -1613,8 +1614,6 @@ static int next_month(icalrecur_iterator* impl)
impl->last.day = last_day;
}
- int found = 0;
-
for(day = impl->last.day+1; day <= days_in_month; day++){
impl->last.day = day;
@@ -1927,8 +1926,8 @@ static int expand_year_days(icalrecur_iterator* impl,
/* BY_WEEK_NO together with BY_MONTH - may conflict, in this case BY_MONTH wins */
if( (flags & 1<<BY_MONTH) && (flags & 1<<BY_WEEK_NO) ){
int valid_weeks[ICAL_BY_WEEKNO_SIZE];
- memset(valid_weeks, 0, sizeof(valid_weeks));
int valid = 1;
+ memset(valid_weeks, 0, sizeof(valid_weeks));
t.year = year;
t.is_date = 1;