Clean up compiler warnings in sysctl(8).
Mostly LGTM, thanks.
The second (struct efi_md *) cast can be dropped. It is redundant.
Alternatively, just memcpy(kind, buf, sizeof(*kind)); here and drop the other changes to this function.
The second struct efi_md * cast is redundant here as well, unless something is directly acting on this macro like: efi_next_descriptor(...)->md_phys. Which, I hope not.