From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org,
Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [PATCH v2] examples/exception_path: fix shift operation in lcore setup
Date: Sun, 11 Sep 2016 20:38:14 +0800 [thread overview]
Message-ID: <20160911123814.GC23158@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1470746235-122818-1-git-send-email-danielx.t.mrzyglod@intel.com>
On Tue, Aug 09, 2016 at 02:37:15PM +0200, Daniel Mrzyglod wrote:
> The operaton may have an undefined behavior or yield to an unexpected result.
> A bit shift operation has a shift amount which is too large or has a negative value.
>
> As was mentioned in mailing list core list was limited to 64 so i changed bitmask
> to core array
>
> Coverity issue: 30688
> Fixes: ea977ff1cb0b ("examples/exception_path: fix shift operation in lcore setup")
>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
...
> + if ((end == &tmp_char))
> + return -1;
Hi,
FYI, my testrobot caught some errors when this patch is applied.
(BTW, gcc builds fine)
--yliu
---
x86_64-native-linuxapp-clang
============================
/root/dpdk/examples/exception_path/main.c:410:12: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if ((end == &tmp_char))
~~~~^~~~~~~~~~~~
/root/dpdk/examples/exception_path/main.c:410:12: note: remove extraneous parentheses around the comparison to silence this warning
if ((end == &tmp_char))
~ ^ ~
/root/dpdk/examples/exception_path/main.c:410:12: note: use '=' to turn this equality comparison into an assignment
if ((end == &tmp_char))
^~
=
1 error generated.
make[1]: *** [main.o] Error 1
make: *** [all] Error 2
error: build examples/exception_path failed
error: build failed
prev parent reply other threads:[~2016-09-11 12:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 11:44 [PATCH] examples/exception_path: fix shift operation in lcore setup Daniel Mrzyglod
2016-08-04 9:02 ` Ferruh Yigit
2016-08-09 12:37 ` [PATCH v2] " Daniel Mrzyglod
2016-09-11 12:38 ` Yuanhan Liu [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=20160911123814.GC23158@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=danielx.t.mrzyglod@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas.monjalon@6wind.com \
/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.