summaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-08 13:07:22 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-08 13:07:22 +0200
commitea39176baab52b646d1e2676e662def718ddd365 (patch)
treeb7efd5049894e2dd699222f9614ffcf01e892480 /src/json.c
parent4ac2e8d8e60dcc7dbff662e177b86ccfbda7cd9e (diff)
downloadvim-git-ea39176baab52b646d1e2676e662def718ddd365.tar.gz
patch 8.0.1677: no compiler warning for wrong format in vim_snprintf()v8.0.1677
Problem: No compiler warning for wrong format in vim_snprintf(). Solution: Add printf attribute for gcc. Fix reported problems.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c
index e1f40bf65..cc756488d 100644
--- a/src/json.c
+++ b/src/json.c
@@ -217,7 +217,7 @@ json_encode_item(garray_T *gap, typval_T *val, int copyID, int options)
case VAR_NUMBER:
vim_snprintf((char *)numbuf, NUMBUFLEN, "%lld",
- val->vval.v_number);
+ (long long)val->vval.v_number);
ga_concat(gap, numbuf);
break;