Present in the upstream msgpack code. I couldn't find a problematic use,
but this will silence Coverity and is cleaner.
Nothing should access 'via' when the type of a msg_pack_object is NIL.
Coverity report:
1448708 Uninitialized scalar variable
The variable will contain an arbitrary value left from earlier
computations.
In template_callback_root: Use of an uninitialized variable (CWE-457)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I4fe63b0279ca7c3f4c34ee8762ec724a731894c5
static inline msgpack_object template_callback_root(unpack_user* u)
{
- msgpack_object o;
+ msgpack_object o = {};
MSGPACK_UNUSED(u);
o.type = MSGPACK_OBJECT_NIL;
return o;