svn commit: r254241 - head/tools/tools/usbtest

Hans Petter Selasky hselasky at FreeBSD.org
Mon Aug 12 09:15:35 UTC 2013


Author: hselasky
Date: Mon Aug 12 09:15:33 2013
New Revision: 254241
URL: http://svnweb.freebsd.org/changeset/base/254241

Log:
  Fix some signed comparison compile warnings.

Modified:
  head/tools/tools/usbtest/usb_control_ep_test.c
  head/tools/tools/usbtest/usb_modem_test.c
  head/tools/tools/usbtest/usb_msc_test.c

Modified: head/tools/tools/usbtest/usb_control_ep_test.c
==============================================================================
--- head/tools/tools/usbtest/usb_control_ep_test.c	Mon Aug 12 09:03:34 2013	(r254240)
+++ head/tools/tools/usbtest/usb_control_ep_test.c	Mon Aug 12 09:15:33 2013	(r254241)
@@ -286,7 +286,7 @@ usb_port_reset_test(uint16_t vid, uint16
 		}
 		timersub(&sub_tv, &ref_tv, &res_tv);
 
-		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= duration))
+		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= (int)duration))
 			break;
 
 		if (libusb20_dev_reset(pdev)) {
@@ -445,7 +445,7 @@ usb_suspend_resume_test(uint16_t vid, ui
 		}
 		timersub(&sub_tv, &ref_tv, &res_tv);
 
-		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= duration))
+		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= (int)duration))
 			break;
 
 		error = libusb20_dev_set_power_mode(pdev, (iter & 1) ?

Modified: head/tools/tools/usbtest/usb_modem_test.c
==============================================================================
--- head/tools/tools/usbtest/usb_modem_test.c	Mon Aug 12 09:03:34 2013	(r254240)
+++ head/tools/tools/usbtest/usb_modem_test.c	Mon Aug 12 09:15:33 2013	(r254241)
@@ -215,7 +215,7 @@ usb_modem_control_ep_test(struct modem *
 		}
 		timersub(&sub_tv, &ref_tv, &res_tv);
 
-		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= duration))
+		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= (int)duration))
 			break;
 
 		LIBUSB20_INIT(LIBUSB20_CONTROL_SETUP, &setup);
@@ -333,7 +333,7 @@ usb_modem_data_stress_test(struct modem 
 		}
 		timersub(&sub_tv, &ref_tv, &res_tv);
 
-		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= duration))
+		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= (int)duration))
 			break;
 
 		libusb20_dev_process(p->usb_dev);

Modified: head/tools/tools/usbtest/usb_msc_test.c
==============================================================================
--- head/tools/tools/usbtest/usb_msc_test.c	Mon Aug 12 09:03:34 2013	(r254240)
+++ head/tools/tools/usbtest/usb_msc_test.c	Mon Aug 12 09:15:33 2013	(r254241)
@@ -798,7 +798,7 @@ retry_read_init:
 		}
 		timersub(&sub_tv, &ref_tv, &res_tv);
 
-		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= p->duration))
+		if ((res_tv.tv_sec < 0) || (res_tv.tv_sec >= (int)p->duration))
 			break;
 
 		do_io_test(p, lun, lba_max, buffer, reference);


More information about the svn-src-all mailing list