From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1 1/1] examples/quota_watermark: fix low_watermark variable placement Date: Wed, 08 Jun 2016 22:36:21 +0200 Message-ID: <183204323.ntq5UxT7Bb@xps13> References: <1464005996-9463-1-git-send-email-piotrx.t.azarewicz@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Piotr Azarewicz Return-path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id F1DE0B44F for ; Wed, 8 Jun 2016 22:36:23 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id m124so32877307wme.1 for ; Wed, 08 Jun 2016 13:36:23 -0700 (PDT) In-Reply-To: <1464005996-9463-1-git-send-email-piotrx.t.azarewicz@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" 2016-05-23 14:19, Piotr Azarewicz: > qw app at its init stage reserve 2*sizeof(int) memory space for quota > and low_watermark shared variables, but both apps (qw and qwctl) assign > wrong address for low_watermark pointer (out of reserved memzone space) > due to wrong pointer arithmetic. > > CID 30709 : Extra sizeof expression (SIZEOF_MISMATCH) > suspicious_pointer_arithmetic: Adding 4UL /* sizeof (int) */ to pointer > (unsigned int *)(*qw_memzone).addr of type unsigned int * is suspicious > because adding an integral value to this pointer automatically scales > that value by the size, 4 bytes, of the pointed-to type, unsigned int. > Most likely, sizeof (int) is extraneous and should be replaced with 1. > > Coverity issue: 30709 > Fixes: 1d6c3ee3321a ("examples/quota_watermark: initial import") > > Signed-off-by: Piotr Azarewicz Applied, thanks Is this example really useful?