jilles 6b71a8aec8 libnv: Fix strict-aliasing violation with cookie
In rS323851, some casts were adjusted in calls to nvlist_next() and
nvlist_get_pararr() in order to make scan-build happy. I think these changes
just confused scan-build into not reporting the strict-aliasing violation.

For example, nvlist_xdescriptors() is causing nvlist_next() to write to its
local variable nvp of type nvpair_t * using the lvalue *cookiep of type
void *, which is not allowed. Given the APIs of nvlist_next(),
nvlist_get_parent() and nvlist_get_pararr(), one possible fix is to create a
local void *cookie in nvlist_xdescriptors() and other places, and to convert
the value to nvpair_t * when necessary. This patch implements that fix.

Reviewed by:	oshogbo
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D12760
2017-10-26 18:32:04 +00:00
..
2017-10-23 15:34:05 +00:00
2017-10-25 15:30:48 +00:00
2017-10-23 15:34:05 +00:00
2017-10-21 12:05:01 +00:00
2017-10-23 20:50:08 +00:00
2017-10-21 12:05:01 +00:00
2017-10-21 12:05:01 +00:00