0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-01-15 20:19:40 +01:00
parent 8e481e8dfe
commit b5443cc46d
16 changed files with 55 additions and 31 deletions

View File

@@ -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)