From: "H. Peter Anvin" <hpa@zytor.com>
To: Eduardo Silva <edsiper@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel: Fix ftrace.c compiler warning when calling ftrace_nop_replace()
Date: Sun, 22 May 2011 18:36:47 -0700 [thread overview]
Message-ID: <4DD9BA2F.9000303@zytor.com> (raw)
In-Reply-To: <1306113548.29789.2.camel@monotop>
On 05/22/2011 06:19 PM, Eduardo Silva wrote:
> the function ftrace_nop_replace() returns a 'static const unsigned char *'
> value, so when the caller perform a direct assignment to a
> 'static unsigned char *', the compiler raise the following warning message:
>
> ftrace.c:308:6: warning: assignment discards qualifiers from pointer target type
> ftrace.c:318:6: warning: assignment discards qualifiers from pointer target type
>
> Adding the proper casts the message goes away.
>
> Signed-off-by: Eduardo Silva <edsiper@gmail.com>
This quiets a warning of something that potentially looks like a real
bug. Perhaps "new" should be const?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2011-05-23 1:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 1:19 [PATCH] kernel: Fix ftrace.c compiler warning when calling ftrace_nop_replace() Eduardo Silva
2011-05-23 1:36 ` H. Peter Anvin [this message]
2011-05-23 2:27 ` Eduardo Silva
2011-05-23 13:08 ` Steven Rostedt
2011-05-23 20:01 ` John Kacur
2011-05-23 20:05 ` H. Peter Anvin
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=4DD9BA2F.9000303@zytor.com \
--to=hpa@zytor.com \
--cc=edsiper@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.