Messages in this thread | | | Date | Wed, 6 Oct 2010 18:36:58 +0800 | From | Américo Wang <> | Subject | Re: [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)?
| |