mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
patch 8.0.1677: no compiler warning for wrong format in vim_snprintf()
Problem: No compiler warning for wrong format in vim_snprintf(). Solution: Add printf attribute for gcc. Fix reported problems.
This commit is contained in:
@@ -5315,7 +5315,7 @@ msg_add_lines(
|
||||
*p++ = ' ';
|
||||
if (shortmess(SHM_LINES))
|
||||
vim_snprintf((char *)p, IOSIZE - (p - IObuff),
|
||||
"%ldL, %lldC", lnum, (varnumber_T)nchars);
|
||||
"%ldL, %lldC", lnum, (long long)nchars);
|
||||
else
|
||||
{
|
||||
if (lnum == 1)
|
||||
@@ -5327,7 +5327,7 @@ msg_add_lines(
|
||||
STRCPY(p, _("1 character"));
|
||||
else
|
||||
vim_snprintf((char *)p, IOSIZE - (p - IObuff),
|
||||
_("%lld characters"), (varnumber_T)nchars);
|
||||
_("%lld characters"), (long long)nchars);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user