Andy, Thanks for the review comments. The lines pointed out by you needs to be removed. Those varibales are unused and can be safely removed
data[8]=(ipmipowercap.totalnumpowersupp); /*ARC: uninitialized*/ data[9]=((ipmipowercap.AvailablePower&0xFF)); /*ARC: uninitialized*/ data[10]=((ipmipowercap.AvailablePower&0xFF00)>>8); /*ARC: uninitialized*/ data[11]=(ipmipowercap.SystemThrottling); /*ARC: uninitialized*/ data[12]=0x00; /* Event this */ Thanks, Srinivas.G n 08/18/2011 12:46 AM, Andy Cress wrote: > Srinivas, > > In looking at this, there are some variables that appear to be > uninitialized in ipmi_set_power_cap() within ipmi_delloem.c. See the > 'ARC:' comments below. > > Andy > > static int ipmi_set_power_cap(struct ipmi_intf* intf,int unit,int val ) > { > struct ipmi_rs *rsp = NULL; > struct ipmi_rq req={0};; > uint8_t data[13]; > uint16_t powercapval; > uint64_t maxpowerbtuphr; > uint64_t maxpowerbtuphr1; > uint64_t minpowerbtuphr; > IPMI_POWER_CAP ipmipowercap; > > [...] > if (verbose > 1) > { > printf("power cap Data :%x %x %x %x %x %x %x %x > %x %x ", > rsp->data[1], rsp->data[2], rsp->data[3], > rsp->data[4], rsp->data[5], rsp->data[6], rsp->data[7], > rsp->data[8], rsp->data[9], rsp->data[10],rsp->data[11]); > > } > > ipmipowercap.PowerCap=((rsp->data[1]<<8)+rsp->data[2]); > ipmipowercap.unit=rsp->data[3]; > ipmipowercap.MaximumPowerConsmp=((rsp->data[4]<<8)+rsp->data[5]); > ipmipowercap.MinimumPowerConsmp=((rsp->data[6]<<8)+rsp->data[7]); > /* ARC: Can more be initialized from rsp->data here? */ > > [...] > data[4]=((ipmipowercap.MaximumPowerConsmp&0xFF)); > data[5]=((ipmipowercap.MaximumPowerConsmp&0xFF00)>>8); > data[6]=((ipmipowercap.MinimumPowerConsmp&0xFF)); > data[7]=((ipmipowercap.MinimumPowerConsmp&0xFF00)>>8); > data[8]=(ipmipowercap.totalnumpowersupp); /*ARC: uninitialized*/ > data[9]=((ipmipowercap.AvailablePower&0xFF)); /*ARC: uninitialized*/ > data[10]=((ipmipowercap.AvailablePower&0xFF00)>>8); /*ARC: > uninitialized*/ > data[11]=(ipmipowercap.SystemThrottling); /*ARC: uninitialized*/ > data[12]=0x00; > [...] > } > > > -----Original Message----- > From: srinivas_g_go...@dell.com [mailto:srinivas_g_go...@dell.com] > Sent: Thursday, August 11, 2011 8:48 AM > To: ipmitool-devel@lists.sourceforge.net > Subject: [Ipmitool-devel] [Dell] [Patch 6/6] Dell Extension commands and > BugFixes > > This patch contains man page updates > > > Thanks, > Srinivas.G > Dell ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel