[ofw] [OPENSM] cast to remove compiler warning.

Stan C. Smith stan.smith at intel.com
Wed Sep 30 13:34:44 PDT 2009


MS compiler squawks about uint32_t --> const uint16_t conversion with possible loss of data.
Cast to eliminate compiler warning.

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

diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index 3894677..6f51404 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -322,7 +322,7 @@ static int mcast_mgr_set_mft_block(osm_sm_t * sm, IN osm_switch_t * p_sw,
 
 	p_tbl = osm_switch_get_mcast_tbl_ptr(p_sw);
 
-	if (osm_mcast_tbl_get_block(p_tbl, block_num,
+	if (osm_mcast_tbl_get_block(p_tbl, (uint16_t) block_num,
 				    (uint8_t) position, block)) {
 
 		block_id_ho = block_num + (position << 28);




More information about the ofw mailing list