From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Chen Gang <gang.chen.5i5j@gmail.com>
Cc: kaber@trash.net, kadlec@blackhole.kfki.hu,
David Miller <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH next] net: netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings
Date: Mon, 5 Jan 2015 12:44:32 +0100 [thread overview]
Message-ID: <20150105114432.GA17895@salvia> (raw)
In-Reply-To: <549AD616.7070709@gmail.com>
On Wed, Dec 24, 2014 at 11:04:54PM +0800, Chen Gang wrote:
> The related code can be simplified, and also can avoid related warnings
> (with allmodconfig under parisc):
>
> CC [M] net/netfilter/nfnetlink_cthelper.o
> net/netfilter/nfnetlink_cthelper.c: In function ‘nfnl_cthelper_from_nlattr’:
> net/netfilter/nfnetlink_cthelper.c:97:9: warning: passing argument 1 o ‘memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
> memcpy(&help->data, nla_data(attr), help->helper->data_len);
> ^
> In file included from include/linux/string.h:17:0,
> from include/uapi/linux/uuid.h:25,
> from include/linux/uuid.h:23,
> from include/linux/mod_devicetable.h:12,
> from ./arch/parisc/include/asm/hardware.h:4,
> from ./arch/parisc/include/asm/processor.h:15,
> from ./arch/parisc/include/asm/spinlock.h:6,
> from ./arch/parisc/include/asm/atomic.h:21,
> from include/linux/atomic.h:4,
> from ./arch/parisc/include/asm/bitops.h:12,
> from include/linux/bitops.h:36,
> from include/linux/kernel.h:10,
> from include/linux/list.h:8,
> from include/linux/module.h:9,
> from net/netfilter/nfnetlink_cthelper.c:11:
> ./arch/parisc/include/asm/string.h:8:8: note: expected ‘void *’ but argument is of type ‘const char (*)[]’
> void * memcpy(void * dest,const void *src,size_t count);
> ^
Applied, thanks.
prev parent reply other threads:[~2015-01-05 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 15:04 [PATCH next] net: netfilter: nfnetlink_cthelper: Remove 'const' and '&' to avoid warnings Chen Gang
2015-01-05 11:44 ` Pablo Neira Ayuso [this message]
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=20150105114432.GA17895@salvia \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=gang.chen.5i5j@gmail.com \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).