[openib-general] Compile warnings (cross build)
Stephen Hemminger
shemminger at osdl.org
Thu Sep 28 08:39:02 PDT 2006
On Thu, 28 Sep 2006 09:11:11 -0700
Roland Dreier <rdreier at cisco.com> wrote:
> Michael> BTW, is there some printk format to print u64 type?
>
> James> Try "%Lu", That will print a long long unsigned value.
>
> That's the problem -- u64 is not always unsigned long long. For
> example on ppc64, u64 is just unsigned long.
>
> - R.
The only safe way is to cast u64 to long long unsigned. and then use
either %Lu or %llu as format string. It means that on 64bit platforms
the u64 will end up getting extended, but the it's harmless.
--
Stephen Hemminger <shemminger at osdl.org>
More information about the general
mailing list