From 4b51aedfc721eb05c79f2c12c4654a173640009d Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 13 Feb 2023 09:03:55 +0100 Subject: Fix sign compare offenders In a few places we compare signed and unsigned integers. In majority of cases it's because the iteration variable is declared as ssize_t but then in the for() loop it's compared against an unsigned int. But there is one case where the opposite happens (libvirt_virDomainSendKey()), or where an UINT_MAX (which is inherently unsigned) is compared against signed long. Also, use this opportunity to decrease scope of 'j' variable inside of libvirt_virDomainInterfaceAddresses(). Signed-off-by: Michal Privoznik --- libvirt-qemu-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvirt-qemu-override.c') diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c index a554498..ef72d51 100644 --- a/libvirt-qemu-override.c +++ b/libvirt-qemu-override.c @@ -343,7 +343,7 @@ libvirt_qemu_virDomainQemuMonitorCommandWithFiles(PyObject *self ATTRIBUTE_UNUSE unsigned int noutfiles = 0; int *outfiles = NULL; char *result = NULL; - ssize_t i; + size_t i; PyObject *py_outfiles = NULL; PyObject *py_retval = NULL; int c_retval; -- cgit v1.2.1