diff src/window.c @ 15490:98c35d312987 v8.1.0753

patch 8.1.0753: printf format not checked for semsg() commit https://github.com/vim/vim/commit/b5443cc46dd1485d6c785dd8c65a2c07bd5a17f3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 15 20:19:40 2019 +0100 patch 8.1.0753: printf format not checked for semsg() Problem: printf format not checked for semsg(). Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle, closes #3805)
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jan 2019 20:30:07 +0100
parents 55ccc2d353bd
children dd725a8ab112
line wrap: on
line diff
--- a/src/window.c
+++ b/src/window.c
@@ -6782,7 +6782,7 @@ match_add(
 	return -1;
     if (id < -1 || id == 0)
     {
-	semsg(_("E799: Invalid ID: %ld (must be greater than or equal to 1)"), id);
+	semsg(_("E799: Invalid ID: %d (must be greater than or equal to 1)"), id);
 	return -1;
     }
     if (id != -1)
@@ -6792,7 +6792,7 @@ match_add(
 	{
 	    if (cur->id == id)
 	    {
-		semsg(_("E801: ID already taken: %ld"), id);
+		semsg(_("E801: ID already taken: %d"), id);
 		return -1;
 	    }
 	    cur = cur->next;
@@ -6969,7 +6969,7 @@ match_delete(win_T *wp, int id, int perr
     if (id < 1)
     {
 	if (perr == TRUE)
-	    semsg(_("E802: Invalid ID: %ld (must be greater than or equal to 1)"),
+	    semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"),
 									  id);
 	return -1;
     }
@@ -6981,7 +6981,7 @@ match_delete(win_T *wp, int id, int perr
     if (cur == NULL)
     {
 	if (perr == TRUE)
-	    semsg(_("E803: ID not found: %ld"), id);
+	    semsg(_("E803: ID not found: %d"), id);
 	return -1;
     }
     if (cur == prev)