lkml.org 
[lkml]   [2014]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] HID: roccat: Drop cast
From
Date
On Sun, 2014-06-29 at 18:34 +0200, Julia Lawall wrote:
> On Thu, 26 Jun 2014, Joe Perches wrote:
> > void func(const void * const p)
> > {
> > char *p2 = p;
> >
> > p2[0] = 1;
> > }
>
> Is this a real example?

No, it's not.

I think I've seen code in the kernel like
char *p2 = (void *)p;
where p is const and p2 is dereferenced and set.




\
 
 \ /
  Last update: 2014-06-29 20:41    [W:0.083 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site