On Fri, 2018-11-02 at 15:52 +0100, Pino Toscano wrote: > The actual type of an enum in C is implementation defined when there are > no negative values, and thus it can be int, or uint. This is the case > of the virError* enums in libvirt, as they do not have negative values. > > Hence, to avoid hitting tautological comparison errors when checking > their rage, temporarly cast the enum values to int when checking they > are not negative. The check is there to ensure the value is within the > range of the OCaml type used to represent it. > > Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx> > --- > libvirt/libvirt_c_epilogue.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Looks sane to me. If that's enough for you, then you can have my Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx> and push. I just really want https://ci.centos.org/view/libvirt/job/libvirt-ocaml-build/ to turn green :) -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list