lkml.org 
[lkml]   [2009]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Zillions of warnings in -next
> I just did a 32-bit build and indeed reproduced the warnings.  However, the warnings
> appear to be dubious as the code is properly (afaict) annotated with explicit casts, and
> I believe they are doing what I intended.
>
> Basically I have structures that are always 64 bit (so we can have a mixed-mode 32-bit
> guest talk to a 64-bit hypervisor, for instance). Therefore I am casting between native
> and u64, but the compiler doesn't like this. Does anyone have any suggestions on ways
> to fix this so the compiler is happy?

foo = (void *)(unsigned long)x

works for the general case because Linux assumes ptr fits ulong

Similarly in the other direction.

Alan


\
 
 \ /
  Last update: 2009-10-27 23:21    [W:0.063 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site