Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2013 09:15:34 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254241 - head/tools/tools/usbtest
Message-ID:  <201308120915.r7C9FYDO010135@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308120915.r7C9FYDO010135>