From f9b0129f5f236b891c4f2085951c8cc1a79e5784 Mon Sep 17 00:00:00 2001
From: Bram Moolenaar <Bram@vim.org>
Date: Sat, 12 Jun 2010 06:45:20 +0200
Subject: [PATCH] Avoid compiler warnings on Mac 10.6.

---
 src/fileio.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/fileio.c b/src/fileio.c
index cead60407b..bc629f39e6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5225,11 +5225,12 @@ msg_add_lines(insert_space, lnum, nchars)
     if (shortmess(SHM_LINES))
 	sprintf((char *)p,
 #ifdef LONG_LONG_OFF_T
-		"%ldL, %lldC",
+		"%ldL, %lldC", lnum, nchars
 #else
-		"%ldL, %ldC",
+		/* Explicit typecast avoids warning on Mac OS X 10.6 */
+		"%ldL, %ldC", lnum, (long)nchars
 #endif
-		lnum, nchars);
+		);
     else
     {
 	if (lnum == 1)
@@ -5242,11 +5243,12 @@ msg_add_lines(insert_space, lnum, nchars)
 	else
 	    sprintf((char *)p,
 #ifdef LONG_LONG_OFF_T
-		    _("%lld characters"),
+		    _("%lld characters"), nchars
 #else
-		    _("%ld characters"),
+		    /* Explicit typecast avoids warning on Mac OS X 10.6 */
+		    _("%ld characters"), (long)nchars
 #endif
-		    nchars);
+		    );
     }
 }
 
-- 
GitLab