-
Pino Toscano authored
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 range, 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@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
aa571fd5