[ofw] [PATCH] osmtest - fix signed unsigned comparisons

Stan C. Smith stan.smith at intel.com
Mon Oct 12 10:21:29 PDT 2009


Make for loop index match loop termination comparison type.

Signed-off-by: stan smith <stan.smith at intel.com>

diff --git a/opensm/osmtest/main.c b/opensm/osmtest/main.c
index 4bb9f82..588a477 100644
--- a/opensm/osmtest/main.c
+++ b/opensm/osmtest/main.c
@@ -214,7 +214,7 @@ static void print_all_guids(IN osmtest_t * p_osmt)
 	ib_api_status_t status;
 	uint32_t num_ports = MAX_LOCAL_IBPORTS;
 	ib_port_attr_t attr_array[MAX_LOCAL_IBPORTS];
-	int i;
+	uint32_t i;
 
 	for (i = 0; i < num_ports; i++) {
 		attr_array[i].num_pkeys = 0;
@@ -247,7 +247,7 @@ ib_net64_t get_port_guid(IN osmtest_t * p_osmt, uint64_t port_guid)
 	ib_api_status_t status;
 	uint32_t num_ports = MAX_LOCAL_IBPORTS;
 	ib_port_attr_t attr_array[MAX_LOCAL_IBPORTS];
-	int i;
+	uint32_t i;
 
 	for (i = 0; i < num_ports; i++) {
 		attr_array[i].num_pkeys = 0;
diff --git a/opensm/osmtest/osmtest.c b/opensm/osmtest/osmtest.c
index c6ec955..a1457b8 100644
--- a/opensm/osmtest/osmtest.c
+++ b/opensm/osmtest/osmtest.c
@@ -7237,7 +7237,7 @@ osmtest_bind(IN osmtest_t * p_osmt,
 	ib_api_status_t status;
 	uint32_t num_ports = MAX_LOCAL_IBPORTS;
 	ib_port_attr_t attr_array[MAX_LOCAL_IBPORTS];
-	int i;
+	uint32_t i;
 
 	OSM_LOG_ENTER(&p_osmt->log);
 




More information about the ofw mailing list