--- cvs-1.12.13+real.orig/src/history.c
+++ cvs-1.12.13+real/src/history.c
@@ -379,7 +379,7 @@
 static const char *
 get_history_log_name (time_t now)
 {
-    char *log_name;
+    char *log_name = NULL;
 
     if (config->HistoryLogPath)
     {
@@ -1561,7 +1561,7 @@
 	    tm = localtime (&(lr->date));
 
 	(void) printf ("%c %04d-%02d-%02d %02d:%02d %s %-*s", ty,
-		  tm->tm_year+1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour,
+		  (int)(tm->tm_year+1900), tm->tm_mon + 1, tm->tm_mday, tm->tm_hour,
 		  tm->tm_min, tz_name, user_len, lr->user);
 
 	workdir = xmalloc (strlen (lr->dir) + strlen (lr->end) + 10);
