From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 97E568079 for ; Tue, 9 Dec 2014 10:21:06 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 09 Dec 2014 01:21:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="495922225" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga003.jf.intel.com with ESMTP; 09 Dec 2014 01:17:23 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 9 Dec 2014 17:19:50 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.67]) with mapi id 14.03.0195.001; Tue, 9 Dec 2014 17:19:42 +0800 From: "Qiu, Michael" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] error: value computed is not used Thread-Index: AdASxiisLi704rCnRgagZfyMuDIXlQ== Date: Tue, 9 Dec 2014 09:19:41 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286C9E0D6@SHSMSX101.ccr.corp.intel.com> References: <533710CFB86FA344BFBF2D6802E60286C9D989@SHSMSX101.ccr.corp.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="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] error: value computed is not used 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, 09 Dec 2014 09:21:07 -0000 Any other comments on this issue?=0A= =0A= Thanks,=0A= Michael=0A= =0A= On 12/8/2014 5:07 PM, Qiu, Michael wrote:=0A= > Hi all,=0A= > My platform is:=0A= >=0A= > uname -a=0A= > Linux suse-11-sp3 3.0.77-0.11-xen #1 SMP Tue Mar 11 16:48:56 CST 2014=0A= > x86_64 x86_64 x86_64 GNU/Linux=0A= >=0A= > gcc -v=0A= > Using built-in specs.=0A= > COLLECT_GCC=3Dgcc=0A= > COLLECT_LTO_WRAPPER=3D/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper=0A= > Target: x86_64-suse-linux=0A= > Configured with: ../configure --prefix=3D/usr --infodir=3D/usr/share/info= =0A= > --mandir=3D/usr/share/man --libdir=3D/usr/lib64 --libexecdir=3D/usr/lib64= =0A= > --enable-languages=3Dc,c++,objc,fortran,obj-c++,java,ada=0A= > --enable-checking=3Drelease --with-gxx-include-dir=3D/usr/include/c++/4.5= =0A= > --enable-ssp --disable-libssp --disable-plugin=0A= > --with-bugurl=3Dhttp://bugs.opensuse.org/ --with-pkgversion=3D'SUSE Linux= '=0A= > --disable-libgcj --disable-libmudflap --with-slibdir=3D/lib64=0A= > --with-system-zlib --enable-__cxa_atexit=0A= > --enable-libstdcxx-allocator=3Dnew --disable-libstdcxx-pch=0A= > --enable-version-specific-runtime-libs --program-suffix=3D-4.5=0A= > --enable-linux-futex --without-system-libunwind --enable-gold=0A= > --with-plugin-ld=3D/usr/bin/gold --with-arch-32=3Di586 --with-tune=3Dgene= ric=0A= > --build=3Dx86_64-suse-linux=0A= > Thread model: posix=0A= > gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux)= =0A= >=0A= > When I try to compile the source code to x86_64 linuxapp, I got this=0A= > error message:=0A= >=0A= > lib/librte_pmd_enic/enic_main.c: In function =91enic_set_rsskey=92:=0A= > lib/librte_pmd_enic/enic_main.c:862:2: error: value computed is not used= =0A= >=0A= > I dig out that, it was ome issue of the macros rte_memcpy()=0A= > #define rte_memcpy(dst, src, n) \=0A= > ((__builtin_constant_p(n)) ? \=0A= > memcpy((dst), (src), (n)) : \=0A= > rte_memcpy_func((dst), (src), (n)))=0A= >=0A= > When I use only (n) instead of (__builtin_constant_p(n), it will pass( I= =0A= > know that it was incorrect, just a experiment).=0A= >=0A= > But I try to use inline function instead of macros:=0A= > static inline void * rte_memcpy(void *dst, const void *src, size_t n)=0A= > {=0A= > return __builtin_constant_p(n) ? memcpy(dst, src, n) :=0A= > rte_memcpy_func(dst, src, n);=0A= > }=0A= >=0A= > It will pass:), and works, this could be one potential workaround fix.=0A= >=0A= > Who knows why? The root cause is what?=0A= >=0A= > I've no idea about this.=0A= >=0A= > Thanks,=0A= > Michael=0A= >=0A= =0A=