Thread (9 messages) 9 messages, 5 authors, 2014-06-30

Re: [PATCH] HID: roccat: Drop cast

From: Joe Perches <joe@perches.com>
Date: 2014-06-29 18:25:54
Also in: lkml

On Sun, 2014-06-29 at 18:34 +0200, Julia Lawall wrote:
On Thu, 26 Jun 2014, Joe Perches wrote:
quoted
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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help