From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] app/test: fix overflow in EFD test Date: Mon, 30 Jan 2017 17:14:49 +0100 Message-ID: <3954309.lYGbWXjxrN@xps13> References: <1485343758-179761-1-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, byron.marohn@intel.com To: Pablo de Lara Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 7E5DA2E8A for ; Mon, 30 Jan 2017 17:14:51 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id v77so53798773wmv.0 for ; Mon, 30 Jan 2017 08:14:51 -0800 (PST) In-Reply-To: <1485343758-179761-1-git-send-email-pablo.de.lara.guarch@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-25 11:29, Pablo de Lara: > When RTE_EFD_VALUE_NUM_BITS is 32, there was a compilation issue > because of an overflow: > > app/test/test_efd.c:157:55: error: overflow in expression; > result is 2147483647 with type 'int' [-Werror,-Winteger-overflow] > data[0] = mrand48() & ((1 << RTE_EFD_VALUE_NUM_BITS) - 1); > > This commit fixes the issue by using a setting a different > macro VALUE_BITMASK with a conditional > > Fixes: 0e925aef2779 ("app/test: add EFD functional and perf tests") > > Reported-by: Yong Liu > Signed-off-by: Pablo de Lara Applied, thanks