[ofw] [PATCH] Update libibmad and infiniband-diags

Leonid Keller leonid at mellanox.co.il
Mon Aug 15 07:25:15 PDT 2011


Hi Sean,

After applying your patch we got a build break on free version of Win8.
It was a warning, something like "possible usage of uninitialized variable 'mad' " in rpc.c#213
I made locally the following patch.
What do you think?
(I understand that as far as 'redirect' is coded to be 1, 'mad' is to be initialized. But compiler doesn't understand. :( )


Index: rpc.c
===================================================================
--- rpc.c	(revision 8610)
+++ rpc.c	(revision 8611)
@@ -212,7 +212,7 @@
 	      ib_portid_t * dport, void *payload, void *rcvdata)
 {
 	int status, len;
-	uint8_t sndbuf[1024], rcvbuf[1024], *mad;
+	uint8_t sndbuf[1024], rcvbuf[1024], *mad = NULL;
 	int redirect = 1;
 	ib_rpc_v1_t *rpcv1 = (ib_rpc_v1_t *)rpc;
 	int error = 0;
@@ -264,7 +264,8 @@
 
 	if (ibdebug) {
 		IBWARN("data offs %d sz %d", rpc->dataoffs, rpc->datasz);
-		xdump(stderr, "mad data\n", mad + rpc->dataoffs, rpc->datasz);
+		if ( mad )
+			xdump(stderr, "mad data\n", mad + rpc->dataoffs, rpc->datasz);
 	}
 
 	if (rcvdata)



> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org [mailto:ofw-
> bounces at lists.openfabrics.org] On Behalf Of Hefty, Sean
> Sent: Thursday, August 11, 2011 9:10 PM
> To: Uri Habusha; ofw at lists.openfabrics.org
> Subject: Re: [ofw] [PATCH] Update libibmad and infiniband-diags
> 
> > Did you check-in this patch to OFW svn. I look for it today in following
> svn:
> > svn://openib.tc.cornell.edu/gen1/trunk and didn't find it.
> 
> I checked this in today around 10:30 or so.  I repulled after and have been
> re-testing the build.  It looks like the check-in lost a windows specific
> patch to ibping that I'll re-apply and check-in shortly.  (Btw, I think the
> commit is 3260, but I'm pulling that from memory, so don't hold me to it.)
> 
> - Sean
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw



More information about the ofw mailing list