The fix is okay. However I wonder how you don't get the error in your environment and we got it. Any idea?
-----Original Message----- From: Hefty, Sean [mailto:sean.he...@intel.com] Sent: Monday, July 26, 2010 7:23 PM To: Smith, Stan; Uri Habusha; o...@lists.openfabrics.org Cc: Leonid Keller; Tzachi Dar; Irena Kruchkovsky; Alex Naslednikov; Sasha Khapyorsky; Ira Weiny; linux-rdma@vger.kernel.org Subject: RE: error when compiling ofed ulp\libibnetdisc > When compiling the ulp\libibnetdisc on OFW I got the following casting > error. When looking the code > it really looks problematic. I wonder how you don't see it in your > environment. I just checked, and this error doesn't show up in my build (7600.16385). > static size_t _unmarshall16(uint8_t * inbuf, uint16_t * num) > > { > > (*num) = (uint64_t) inbuf[0]; > > (*num) |= ((uint16_t) inbuf[1] << 8); The cast to uint64_t is wrong. We can replace the above with: (*num) = ((uint16_t) inbuf[1] << 8) | inbuf[0]; - Sean -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html