0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04: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:
Bram Moolenaar
2018-04-08 13:07:22 +02:00
parent 4ac2e8d8e6
commit ea39176baa
10 changed files with 51 additions and 31 deletions

View File

@@ -7105,7 +7105,7 @@ get_tv_string_buf_chk(typval_T *varp, char_u *buf)
{
case VAR_NUMBER:
vim_snprintf((char *)buf, NUMBUFLEN, "%lld",
(varnumber_T)varp->vval.v_number);
(long long)varp->vval.v_number);
return buf;
case VAR_FUNC:
case VAR_PARTIAL: