changeset 2261:06a7438b3ef7 vim73

Avoid compiler warnings on Mac 10.6.
author Bram Moolenaar <bram@vim.org>
date Sat, 12 Jun 2010 06:45:20 +0200
parents 0e27866cea99
children 771f21e35ec5
files src/fileio.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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",
-#endif
-		lnum, nchars);
+		/* Explicit typecast avoids warning on Mac OS X 10.6 */
+		"%ldL, %ldC", lnum, (long)nchars
+#endif
+		);
     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"),
-#endif
-		    nchars);
+		    /* Explicit typecast avoids warning on Mac OS X 10.6 */
+		    _("%ld characters"), (long)nchars
+#endif
+		    );
     }
 }