Skip to contentSkip to conversation

opensm/osm_switch.c: Fix compile warnings

PATCH In review Hal Rosenstock 2 participants 2 messages Jul 5, 2011 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_switch.c: Fix compile warnings

osm_switch.c: In function 'osm_switch_recommend_path':
osm_switch.c:282: warning: 'found_node_guid' may be used uninitialized in this function osm_switch.c:281: warning: 'found_sys_guid' may be used uninitialized in this function

---

opensm/osm_switch.c +2 -2
index d921715..8fb84c3 100644
@@ -278,8 +278,8 @@ uint8_t osm_switch_recommend_path(IN const osm_switch_t * p_sw,
 	unsigned int port_paths_count = 0;
 	uint8_t scatter_possible_ports[IB_NODE_NUM_PORTS_MAX];
 	unsigned int scatter_possible_ports_count = 0;
-	int found_sys_guid;
-	int found_node_guid;
+	int found_sys_guid = 0;
+	int found_node_guid = 0;
 
 	CL_ASSERT(lid_ho > 0);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive

Hi Hal,

Quoted 7 lines · Hal Rosenstock

osm_switch.c: In function 'osm_switch_recommend_path':
osm_switch.c:282: warning: 'found_node_guid' may be used uninitialized in this function osm_switch.c:281: warning: 'found_sys_guid' may be used uninitialized in this function

---

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html