lkml.org 
[lkml]   [2007]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ptrdiff_t is not uintptr_t, damnit
On Sun, Aug 19, 2007 at 08:26:24PM -0700, David Brownell wrote:

> ISTR the warning was the other way around: about "cast from integer
> to pointer of a different size". The __u64 came from userspace and
> the kernel pointer was only 32 bits. Not really truncation, but GCC
> could not know that directly ... ergo the extra non-pointer cast.

And? Cast to integer type with the size equal to that of pointer.
unsigned long is just that on all supported targets.

More interesting question is whether you want an error returned when
pointers are 32bit and value doesn't fit into that...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-20 05:43    [W:0.037 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site