[ofa-general] [PATCH] infiniband-diags/ibportstate.c: Eliminate uninitialized variable compile warning

Hal Rosenstock hnrose at comcast.net
Tue Sep 22 16:59:36 PDT 2009


Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
diff --git a/infiniband-diags/src/ibportstate.c b/infiniband-diags/src/ibportstate.c
index 6fb97a8..55e1dd5 100644
--- a/infiniband-diags/src/ibportstate.c
+++ b/infiniband-diags/src/ibportstate.c
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
 	int state, physstate, lwe, lws, lwa, lse, lss, lsa;
 	int peerlocalportnum, peerlwe, peerlws, peerlwa, peerlse, peerlss,
 	    peerlsa;
-	int width, peerwidth, peerspeed;
+	int width = 255, peerwidth, peerspeed;
 	uint8_t data[IB_SMP_DATA_SIZE];
 	ib_portid_t peerportid = { 0 };
 	int portnum = 0;



More information about the general mailing list