netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kbuild@01.org,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	kbuild test robot <lkp@intel.com>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [nf-next:master 5/17] net/netfilter/nft_bitwise.c:138:50: warning: size argument in 'memcmp' call is a comparison
Date: Tue, 13 Aug 2019 13:01:25 -0700	[thread overview]
Message-ID: <CAKwvOdkHTfFzypb04LvKKx5h6QzcSueZeoHaG-RUE=x1jN=Bpg@mail.gmail.com> (raw)
In-Reply-To: <201908140300.REaRIkQ8%lkp@intel.com>

+ 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

           reply	other threads:[~2019-08-13 20:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201908140300.REaRIkQ8%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='CAKwvOdkHTfFzypb04LvKKx5h6QzcSueZeoHaG-RUE=x1jN=Bpg@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=coreteam@netfilter.org \
    --cc=kbuild@01.org \
    --cc=lkp@intel.com \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).