lint: Removing dead initializations #5410

This commit is contained in:
Patrick Jackson 2016-09-29 18:45:13 -07:00 committed by Justin M. Keyes
parent b6300742d2
commit 09e0c96201

View File

@ -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)),
})));
}