summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-23 14:33:19 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-23 14:33:19 +0200
commitdc633cf82758f67f656cda7fa8ccc30414ee53f8 (patch)
treee8a018a83d53136a6891b4ee4d37a8eb4183ce53 /src/json.c
parent73dfe917ba6357413aaf98a021c91add5ac6e9bc (diff)
patch 7.4.1780v7.4.1780
Problem: Warnings reported by cppcheck. Solution: Fix the warnings. (Dominique Pelle)
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 b4ebe74146..aa168ec117 100644
--- a/src/json.c
+++ b/src/json.c
@@ -539,7 +539,6 @@ json_decode_string(js_read_T *reader, typval_T *res)
char_u *p;
int c;
long nr;
- char_u buf[NUMBUFLEN];
if (res != NULL)
ga_init2(&ga, 1, 200);
@@ -617,6 +616,7 @@ json_decode_string(js_read_T *reader, typval_T *res)
if (res != NULL)
{
#ifdef FEAT_MBYTE
+ char_u buf[NUMBUFLEN];
buf[utf_char2bytes((int)nr, buf)] = NUL;
ga_concat(&ga, buf);
#else