[libvirt] [PATCH v2 06/14] libxl: handle missing switch enum cases
Martin Kletzander
mkletzan at redhat.com
Wed Feb 21 09:35:04 UTC 2018
On Tue, Feb 20, 2018 at 05:08:14PM +0000, Daniel P. Berrangé wrote:
>Cast away enum type for libxl schedular constants since we don't want to
s/schedular/scheduler/
>cover all of them and don't want build to break when new ones are added.
>
>Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
>---
> src/libxl/libxl_driver.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
>index be11134fb2..4b52de36f5 100644
>--- a/src/libxl/libxl_driver.c
>+++ b/src/libxl/libxl_driver.c
>@@ -4497,7 +4497,7 @@ libxlDomainGetSchedulerType(virDomainPtr dom, int *nparams)
>
> if (nparams)
> *nparams = 0;
>- switch (sched_id) {
>+ switch ((int)sched_id) {
We should get consistent with the spacing after cast and add it to HACKING.
This way I can't tell you to add a space there =)
> case LIBXL_SCHEDULER_SEDF:
> name = "sedf";
> break;
>--
>2.14.3
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180221/c8302460/attachment-0001.sig>
More information about the libvir-list
mailing list