changeset 29094:1fe2d79f7309 v8.2.5068

patch 8.2.5068: gcc 12.1 warning when building tee Commit: https://github.com/vim/vim/commit/68093d36bf87caf2c2ba7404c06d14ef8416c27a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 8 13:11:45 2022 +0100 patch 8.2.5068: gcc 12.1 warning when building tee Problem: Gcc 12.1 warning when building tee. Solution: Change type to size_t. (John Marriott)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Jun 2022 14:15:02 +0200
parents ef9f05324fea
children f12e06b1dd95
files src/tee/tee.c src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/tee/tee.c
+++ b/src/tee/tee.c
@@ -82,7 +82,7 @@ int
 main(int argc, char *argv[])
 {
 	int	append = 0;
-	int	numfiles;
+	size_t	numfiles;
 	int	maxfiles;
 	FILE	**filepointers;
 	int	i;
@@ -121,7 +121,8 @@ main(int argc, char *argv[])
 	filepointers = calloc(numfiles, sizeof(FILE *));
 	if (filepointers == NULL)
 	{
-		fprintf(stderr, "Error allocating memory for %d files\n", numfiles);
+		fprintf(stderr, "Error allocating memory for %ld files\n",
+															   (long)numfiles);
 		exit(1);
 	}
 	for (i = 0; i < numfiles; i++)
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    5068,
+/**/
     5067,
 /**/
     5066,