lkml.org 
[lkml]   [2010]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] procfs: fix numbering in /proc/locks
On Tue, Oct 05, 2010 at 02:14:11PM +0200, Jerome Marchand wrote:
>On 09/30/2010 02:38 PM, Jerome Marchand wrote:
...
>> - f->private = (void *)1;
>> + f->private = (void *) (*pos + 1);
>
>That cast trigger a warning on some arch:
>"warning: cast to pointer from integer of different size"
>
>There is no real risk here. At worst /proc/locks will show wrong number
>if there is more than 2^32 locks, but should I mute the warning it with
>something like:
> f->private = (void *) (size_t) (*pos + 1);
>?

Or maybe cast to (void *) (unsigned long)?


\
 
 \ /
  Last update: 2010-10-06 12:35    [W:0.758 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site