Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
* Re: [nf-next:master 5/17] net/netfilter/nft_bitwise.c:138:50: warning: size argument in 'memcmp' call is a comparison
       [not found] <201908140300.REaRIkQ8%lkp@intel.com>
@ 2019-08-13 20:01 ` Nick Desaulniers
  0 siblings, 0 replies; only message in thread
From: Nick Desaulniers @ 2019-08-13 20:01 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: kbuild, clang-built-linux, kbuild test robot, netfilter-devel, coreteam

+ Pablo, looks like the closing parens need to be adjusted.

On Tue, Aug 13, 2019 at 12:12 PM kbuild test robot <lkp@intel.com> wrote:
>
> CC: kbuild-all@01.org
> CC: netfilter-devel@vger.kernel.org
> CC: coreteam@netfilter.org
> TO: Pablo Neira Ayuso <pablo@netfilter.org>
>
> tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/pablo/nf-next.git master
> head:   105333435b4f3b21ffc325f32fae17719310db64
> commit: bd8699e9e29287b5571b32b68c3dcd05985fa9b1 [5/17] netfilter: nft_bitwise: add offload support
> config: x86_64-rhel-7.6 (attached as .config)
> compiler: clang version 10.0.0 (git://gitmirror/llvm_project 45a3fd206fb06f77a08968c99a8172cbf2ccdd0f)
> reproduce:
>         git checkout bd8699e9e29287b5571b32b68c3dcd05985fa9b1
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> net/netfilter/nft_bitwise.c:138:50: warning: size argument in 'memcmp' call is a comparison [-Wmemsize-comparison]
>            if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
>                                          ~~~~~~~~~~~~~~~~~~^~
>    net/netfilter/nft_bitwise.c:138:6: note: did you mean to compare the result of 'memcmp' instead?
>            if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
>                ^
>                                                           )
>    net/netfilter/nft_bitwise.c:138:32: note: explicitly cast the argument to size_t to silence this warning
>            if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
>                                          ^
>                                          (size_t)(
>    1 warning generated.
>
> vim +/memcmp +138 net/netfilter/nft_bitwise.c
>
>    131
>    132  static int nft_bitwise_offload(struct nft_offload_ctx *ctx,
>    133                                 struct nft_flow_rule *flow,
>    134                                 const struct nft_expr *expr)
>    135  {
>    136          const struct nft_bitwise *priv = nft_expr_priv(expr);
>    137
>  > 138          if (memcmp(&priv->xor, &zero, sizeof(priv->xor) ||
>    139              priv->sreg != priv->dreg))
>    140                  return -EOPNOTSUPP;
>    141
>    142          memcpy(&ctx->regs[priv->dreg].mask, &priv->mask, sizeof(priv->mask));
>    143
>    144          return 0;
>    145  }
>    146
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201908140300.REaRIkQ8%lkp@intel.com>
2019-08-13 20:01 ` [nf-next:master 5/17] net/netfilter/nft_bitwise.c:138:50: warning: size argument in 'memcmp' call is a comparison Nick Desaulniers

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org netfilter-devel@archiver.kernel.org
	public-inbox-index netfilter-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox