mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: <kbuild-all@lists.01.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: net/netfilter/nf_tables_api.c:2014:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
Date: Thu, 27 Jan 2022 13:29:38 +0800	[thread overview]
Message-ID: <bc07fc43-c0a0-8d9a-f77c-cfce71a069fe@intel.com> (raw)
In-Reply-To: <202201250614.Oo7D9VA6-lkp@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 2c865a8a28a10e9800a3dd07ca339d24563e3d65 netfilter: nf_tables: add rule blob layout
date:   2 weeks ago
compiler: arceb-elf-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not be real problems)

 >> net/netfilter/nf_tables_api.c:2014:2: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
     ptr += offsetof(struct nft_rule_dp, data);
     ^

vim +2014 net/netfilter/nf_tables_api.c

0cbc06b3faba75 Florian Westphal  2018-05-25  2007
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2008  static void nft_last_rule(struct nft_rule_blob *blob, const void *ptr)
0cbc06b3faba75 Florian Westphal  2018-05-25  2009  {
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2010  	struct nft_rule_dp *prule;
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2011
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2012  	prule = (struct nft_rule_dp *)ptr;
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2013  	prule->is_last = 1;
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09 @2014  	ptr += offsetof(struct nft_rule_dp, data);
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2015  	/* blob size does not include the trailer rule */
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2016  }
2c865a8a28a10e Pablo Neira Ayuso 2022-01-09  2017

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

           reply	other threads:[~2022-01-27  5:29 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <202201250614.Oo7D9VA6-lkp@intel.com>]

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=bc07fc43-c0a0-8d9a-f77c-cfce71a069fe@intel.com \
    --to=yujie.liu@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pablo@netfilter.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

all inboxes | Powered by JetHome®