From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A59FB803E for ; Mon, 15 Dec 2014 17:35:28 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 15 Dec 2014 08:35:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,580,1413270000"; d="scan'208";a="637820186" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga001.fm.intel.com with ESMTP; 15 Dec 2014 08:35:26 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX107.ger.corp.intel.com ([169.254.10.190]) with mapi id 14.03.0195.001; Mon, 15 Dec 2014 16:35:25 +0000 From: "Ananyev, Konstantin" To: "Wodkowski, PawelX" , Thomas Monjalon Thread-Topic: [dpdk-dev] error: value computed is not used Thread-Index: AdASxiisLi704rCnRgagZfyMuDIXlQANP/TQAVaWb4AAALwbsAAEld2AAABHqiAAAXW7AAACyuyQAAIGRjA= Date: Mon, 15 Dec 2014 16:35:24 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213C0DBE@IRSMSX105.ger.corp.intel.com> References: <533710CFB86FA344BFBF2D6802E60286C9D989@SHSMSX101.ccr.corp.intel.com> <3427289.cFFhb9tNHS@xps13> <4008093.EPhAooubXd@xps13> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" 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: Mon, 15 Dec 2014 16:35:29 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wodkowski, PawelX > Sent: Monday, December 15, 2014 3:44 PM > To: Thomas Monjalon > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] error: value computed is not used >=20 > > > > > And something like this? > > > > > > > > > > #define rte_memcpy(dst, src, n) \ > > > > > - ((__builtin_constant_p(n)) ? \ > > > > > + ({ (__builtin_constant_p(n)) ? \ > > > > > memcpy((dst), (src), (n)) : \ > > > > > - rte_memcpy_func((dst), (src), (n))) > > > > > + rte_memcpy_func((dst), (src), (n)); }) > > > > > > > > What happens to the returned value after this change? > > > > ptr =3D rte_memcpy(dst, src, n) + offset: > > > > > > > https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement-Exp= rs > > > > > > Whole expression should be 'void *' type (like *memcpy()) and it shou= ld work > > > as usual (see maxint() example in above link). It is GCC extension. > > > > OK nice. > > I didn't test it on SUSE 11 SP3. I assume you did it? > I did not tested this, as this was only proposal. I only run build proces= s and it pass. > Patch proposal will be sent in a while. >=20 > > Please Pawel, could you send a proper patch quickly? > > If nobody disagree, it'll be merged in RC5 today. > > > > > > > Thomas, can you check build with EXTRA_CFLAG=3D'-Wunused-value'. > > > > > > > > You mean EXTRA_CFLAGS (with a S). > > > > It fails in many locations. > > > > What's your point? > > > > > > I am just asking if this is an typo, error or intend to do statements= with no > > effects like bellow. > > > > > > ixgbe_common.c:4429:3: error: statement with no effect [-Werror=3Dunu= sed- > > value] > > > > > > 4426: /* first pull in the header so we know the buffer length */ > > > 4427: for (bi =3D 0; bi < dword_len; bi++) { > > > 4428: buffer[bi] =3D IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, > > bi); > > > 4429: IXGBE_LE32_TO_CPUS(&buffer[bi]); // <------ here > > > 4430 } > > > > It's an intent. On big endian CPU, this has an effect. > > >=20 > If you see something what I am not, please ignore this part but for me th= is looks like it should be: > tmp =3D IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, > buffer[bi] =3D IXGBE_LE32_TO_CPUS (tmp); Yep, same thought here, see my other mail on that subject. Konstantin >=20 > Pawel