summaryrefslogtreecommitdiffstats
path: root/src/drivers/usb
diff options
context:
space:
mode:
authorMichael Brown2015-06-01 18:18:08 +0200
committerMichael Brown2015-06-01 18:19:48 +0200
commit6d195c5669b3d4c728074a78f0dab9085a012734 (patch)
treecdabc7e1b70b7102b11141385779ce9867af8920 /src/drivers/usb
parent[build] Fix .ids.o creation for drivers not in the all-drivers build (diff)
downloadipxe-6d195c5669b3d4c728074a78f0dab9085a012734.tar.gz
ipxe-6d195c5669b3d4c728074a78f0dab9085a012734.tar.xz
ipxe-6d195c5669b3d4c728074a78f0dab9085a012734.zip
[xhci] Fix comparison of signed and unsigned integers
gcc 4.8.2 fails to report this erroneous comparison unless assertions are enabled. Reported-by: Mary-Ann Johnson <MaryAnn.Johnson@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/xhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/usb/xhci.c b/src/drivers/usb/xhci.c
index 4b143369..fa496698 100644
--- a/src/drivers/usb/xhci.c
+++ b/src/drivers/usb/xhci.c
@@ -2622,7 +2622,7 @@ static int xhci_device_open ( struct usb_device *usb ) {
rc = id;
goto err_enable_slot;
}
- assert ( ( id > 0 ) && ( id <= xhci->slots ) );
+ assert ( ( id > 0 ) && ( ( unsigned int ) id <= xhci->slots ) );
assert ( xhci->slot[id] == NULL );
/* Allocate and initialise structure */