Claudio Jeker <cje...@diehard.n-r-g.com> writes:

> On Tue, Jan 04, 2022 at 10:58:41AM +0100, Claudio Jeker wrote:
>> This are obvious and easy to fix unused but set variables.
>> There are more in vioscsi.c but those are actually used if compiled with
>> DEBUG set.
>
> The changes in loadfile_elf.c, vioqcow2.c and vmd.c are trivial and can be
> committed one by one. The change in vmm.c actually uncovered a possible
> issue. If vm_register() fails the vm pointer will most probably be NULL
> and so the next line will access a NULL pointer.
>
> I think this diff is better. It cleans up also a totally unused
> IMSG_VMDOP_RECEIVE_VM_RESPONSE imsg type.
>
> It is hard to fail the vm_register() call so it is not trivial to really
> test the error case but I did test vmctl receive and that still works.

I'm ok squelching the warnings...but this reminds me I need to get off
my ass and finish cleaning up vm_register(). It sets invalid errno
values (VMD_DISK_MISSING or something) and makes things unnecessarily
complicated by using errno instead of just returning the error
directly.

-dv

Reply via email to