diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-06-01 17:18:08 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-06-01 17:19:48 +0100 |
commit | 6d195c5669b3d4c728074a78f0dab9085a012734 (patch) | |
tree | cdabc7e1b70b7102b11141385779ce9867af8920 | |
parent | 25d6c80498b98a9b41ca1fec50cd2038f6f17547 (diff) | |
download | ipxe-6d195c5669b3d4c728074a78f0dab9085a012734.tar.gz |
[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>
-rw-r--r-- | src/drivers/usb/xhci.c | 2 |
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 */ |