[libvirt] [PATCH v2] Fix cast errors with clang