The memset() on the KeyValue is more explicit even though if you trace
the code you will see it fills out the struct. However, it's possible
that not every struct member will be initialized and adding the
memset() makes things more obvious and appeases the static analyzer.
The queue_init() appeared to just be missing.
KeyValue kv;
Repokey *key;
+ memset(&kv, 0, sizeof(kv));
+
for (i = pd->first; i < pool->nsolvables; i++)
{
if (pool->solvables[i].repo != pd->repo)
if (uninternalized)
{
KeyValue kv;
+ memset(&kv, 0, sizeof(kv));
Repokey *key = repodata_lookup_kv_uninternalized(data, p, keyname, &kv);
if (!key)
return 0;
if ((resultflags & TESTCASE_RESULT_USERINSTALLED) != 0)
{
Queue q;
+ queue_init(&q);
solver_get_userinstalled(solv, &q, 0);
for (i = 0; i < q.count; i++)
{