Linux Input/HID development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Himangi Saraogi <himangi774@gmail.com>,
	Stefan Achatz <erazor_de@users.sourceforge.net>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: roccat: Drop cast
Date: Sun, 29 Jun 2014 11:25:49 -0700	[thread overview]
Message-ID: <1404066349.9064.60.camel@joe-AO725> (raw)
In-Reply-To: <alpine.DEB.2.02.1406291832430.2036@localhost6.localdomain6>

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.



  reply	other threads:[~2014-06-29 18:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 17:28 [PATCH] HID: roccat: Drop cast Himangi Saraogi
2014-06-26 17:38 ` Joe Perches
2014-06-27  5:29   ` Julia Lawall
2014-06-27  5:52     ` Joe Perches
2014-06-27  7:59       ` Julia Lawall
2014-06-29 16:34       ` Julia Lawall
2014-06-29 18:25         ` Joe Perches [this message]
2014-06-30  9:08           ` Geert Uytterhoeven
2014-06-26 22:35 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404066349.9064.60.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=erazor_de@users.sourceforge.net \
    --cc=himangi774@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox