$OpenBSD: patch-libicalmapi_recurrence_cpp,v 1.1.1.1 2009/02/16 09:44:38 ajacoutot Exp $
--- libicalmapi/recurrence.cpp.orig	Wed Dec 24 20:17:56 2008
+++ libicalmapi/recurrence.cpp	Sat Jan 10 15:45:22 2009
@@ -930,7 +930,7 @@ list<time_t> recurrence::getExceptions(){
 
 bool recurrence::isOccurrence(time_t time){
 	calcEndDate();
-	if(this->term != NEVER && time > (this->enddate + this->starttime*60))
+	if(this->term != NEVER && (unsigned int)time > (this->enddate + this->starttime*60))
 		return false;
 
 	if(isDeletedOccurrence(time))
@@ -954,7 +954,7 @@ bool recurrence::isRuleOccurrence(time_t time){
 		return false;
 
 	calcEndDate();
-	if(this->term != NEVER && time > (this->enddate + this->starttime*60))
+	if(this->term != NEVER && (unsigned int)time > (this->enddate + this->starttime*60))
 		return false;
 
 	if(this->freq == DAILY){
@@ -1037,9 +1037,9 @@ bool recurrence::isAfter(time_t t){
 	}
 	switch(freq){
 		case YEARLY:
-			if(lpT->tm_mon + 1 < this->month)
+			if((unsigned int)lpT->tm_mon + 1 < this->month)
 				return true;
-			if(lpT->tm_mon + 1 > this->month)
+			if((unsigned int)lpT->tm_mon + 1 > this->month)
 				return false;
 		case MONTHLY:
 			if(this->nday == 5){
@@ -1057,9 +1057,9 @@ bool recurrence::isAfter(time_t t){
 				if(!(this->weekdays & (1 << lpT->tm_wday)))
 					return true;
 			}else if(this->nday>0){
-				if(this->nday < lpT->tm_mday / 7)
+				if(this->nday < (unsigned int)lpT->tm_mday / 7)
 					return true;
-				if(this->nday < lpT->tm_mday / 7)
+				if(this->nday < (unsigned int)lpT->tm_mday / 7)
 					return false;
 				char i = lpT->tm_wday - ((lpT->tm_mday - 1) % 7);
 				if(i < 0)
@@ -1072,13 +1072,13 @@ bool recurrence::isAfter(time_t t){
 				if(!(this->weekdays & (1 << lpT->tm_wday)))
 					return true;
 			}else{
-				if(lpT->tm_mday < this->monthday)
+				if((unsigned int)lpT->tm_mday < this->monthday)
 					return true;
-				if(lpT->tm_mday > this->monthday)
+				if((unsigned int)lpT->tm_mday > this->monthday)
 					return true;
 			}
 	}
-	if(lpT->tm_hour * 60 + lpT->tm_min < this->starttime)
+	if((unsigned int)lpT->tm_hour * 60 + lpT->tm_min < this->starttime)
 		return true;
 	return false;
 }
