From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2] examples/exception_path: fix shift operation in lcore setup Date: Sun, 11 Sep 2016 20:38:14 +0800 Message-ID: <20160911123814.GC23158@yliu-dev.sh.intel.com> References: <1470224651-105433-1-git-send-email-danielx.t.mrzyglod@intel.com> <1470746235-122818-1-git-send-email-danielx.t.mrzyglod@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ferruh.yigit@intel.com, dev@dpdk.org, Thomas Monjalon To: Daniel Mrzyglod Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 14AE79E3 for ; Sun, 11 Sep 2016 14:37:47 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1470746235-122818-1-git-send-email-danielx.t.mrzyglod@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- ... > + 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