aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Jackson <PatrickSJackson@gmail.com>2016-09-29 18:45:13 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-10-08 00:01:03 +0200
commit09e0c96201bd525d1a00fe88cef8b1a8e678d6b7 (patch)
tree6d1a1b3b2b48d04d130061c1ddcc23b546e850ab
parentb6300742d2063373b1bf1adee03a97dd3190f069 (diff)
downloadrneovim-09e0c96201bd525d1a00fe88cef8b1a8e678d6b7.tar.gz
rneovim-09e0c96201bd525d1a00fe88cef8b1a8e678d6b7.tar.bz2
rneovim-09e0c96201bd525d1a00fe88cef8b1a8e678d6b7.zip
lint: Removing dead initializations #5410
-rw-r--r--src/nvim/api/private/helpers.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index fc114bae16..d80ee7dc67 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -368,11 +368,10 @@ static inline void typval_encode_list_start(EncodedData *const edata,
const size_t len)
FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL
{
- const Object obj = OBJECT_INIT;
kv_push(edata->stack, ARRAY_OBJ(((Array) {
.capacity = len,
.size = 0,
- .items = xmalloc(len * sizeof(*obj.data.array.items)),
+ .items = xmalloc(len * sizeof(*((Object *)NULL)->data.array.items)),
})));
}
@@ -409,11 +408,10 @@ static inline void typval_encode_dict_start(EncodedData *const edata,
const size_t len)
FUNC_ATTR_ALWAYS_INLINE FUNC_ATTR_NONNULL_ALL
{
- const Object obj = OBJECT_INIT;
kv_push(edata->stack, DICTIONARY_OBJ(((Dictionary) {
.capacity = len,
.size = 0,
- .items = xmalloc(len * sizeof(*obj.data.dictionary.items)),
+ .items = xmalloc(len * sizeof(*((Object *)NULL)->data.dictionary.items)),
})));
}