From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CDBD6805E for ; Tue, 16 Dec 2014 02:57:51 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 15 Dec 2014 17:55:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,583,1413270000"; d="scan'208";a="624307733" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga001.jf.intel.com with ESMTP; 15 Dec 2014 17:57:49 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 16 Dec 2014 09:57:48 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Tue, 16 Dec 2014 09:57:47 +0800 From: "Qiu, Michael" To: "Jastrzebski, MichalX K" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] fix rte_memcpy() macro: avoid unused value warning Thread-Index: AQHQGIf+JnYhfoz550mKPU/3DVL/og== Date: Tue, 16 Dec 2014 01:57:46 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286CA0168@SHSMSX101.ccr.corp.intel.com> References: <1418662502-16406-1-git-send-email-michalx.k.jastrzebski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] fix rte_memcpy() macro: avoid unused value warning X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2014 01:57:52 -0000 On 12/16/2014 12:55 AM, Michal Jastrzebski wrote:=0A= > From: Pawel Wodkowski =0A= >=0A= > This change use statements in expressions C extension provided by gcc to = avoid=0A= > 'value computed is not used' warning/error when size is not known at comp= ile=0A= > time.=0A= >=0A= > Comments on possible side effects are welcome an tests are welcome.=0A= >=0A= > Reported-by: Qiu, Michael =0A= > Signed-off-by: Pawel Wodkowski =0A= > ---=0A= > .../common/include/arch/x86/rte_memcpy.h | 4 ++--=0A= > 1 file changed, 2 insertions(+), 2 deletions(-)=0A= >=0A= > diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/li= brte_eal/common/include/arch/x86/rte_memcpy.h=0A= > index 290c5cd..c3e8b81 100644=0A= > --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h=0A= > +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h=0A= > @@ -169,9 +169,9 @@ rte_mov256(uint8_t *dst, const uint8_t *src)=0A= > }=0A= > =0A= > #define rte_memcpy(dst, src, n) \=0A= > - ((__builtin_constant_p(n)) ? \=0A= > + ({ (__builtin_constant_p(n)) ? \=0A= > memcpy((dst), (src), (n)) : \=0A= > - rte_memcpy_func((dst), (src), (n)))=0A= > + rte_memcpy_func((dst), (src), (n)); })=0A= > =0A= > static inline void *=0A= > rte_memcpy_func(void *dst, const void *src, size_t n)=0A= =0A= Acked-by: Qiu, Michael =0A= =0A=