From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markos Chandras Subject: Re: [PATCH] e1000/base: Add missing braces to the 'if' statements Date: Mon, 27 Jun 2016 16:47:08 +0100 Message-ID: References: <20160623092552.30932-1-mchandras@suse.de> <20160627143948.GB17808@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: Bruce Richardson Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by dpdk.org (Postfix) with ESMTP id 87F654B79 for ; Mon, 27 Jun 2016 17:47:14 +0200 (CEST) In-Reply-To: <20160627143948.GB17808@bricha3-MOBL3> 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" Hi Bruce, On 06/27/2016 03:39 PM, Bruce Richardson wrote: > On Thu, Jun 23, 2016 at 10:25:52AM +0100, Markos Chandras wrote: >> Add the missing braces to the 'if' statements to fix the misleading >> identation. This also fixes the following build errors when building >> with gcc >=3D 6: >> >> drivers/net/e1000/base/e1000_phy.c:4156:2: >> error: this 'if' clause does not guard... [-Werror=3Dmisleading-indent= ation] >> if (locked) >> ^~ >> >> drivers/net/e1000/base/e1000_phy.c:4158:3: >> note: ...this statement, but the latter is misleadingly indented as if= it is guarded by the 'if' >> if (!ready) >> ^~ >> >> drivers/net/e1000/base/e1000_phy.c: In function 'e1000_write_phy_reg_m= phy': >> drivers/net/e1000/base/e1000_phy.c:4221:2: >> error: this 'if' clause does not guard... [-Werror=3Dmisleading-indent= ation] >> if (locked) >> ^~ >> >> drivers/net/e1000/base/e1000_phy.c:4223:3: >> note: ...this statement, but the latter is misleadingly indented as if= it is guarded by the 'if' >> if (!ready) >> ^~ >> >> Signed-off-by: Markos Chandras >> --- >=20 > Any particular compiler flags needed to reproduce this issue? Compiling= with > gcc6.1 I don't see any errors reported. >=20 > /Bruce >=20 I only have the log from the 2.2.0 + gcc-6 build so here is the line gcc -Wp,-MD,./.e1000_phy.o.d.tmp -m64 -pthread -fPIC -march=3Dcore2 -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_COMPILE_TIME_CPUFLAGS =3DRTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3 -I/home/abuild/rpmbuild/BUILD/dpdk-2.2.0/x86_64-native-linuxapp-gcc/inclu= de -include /home/abuild/rpmbuild/BUILD/dpdk-2.2.0/x86_64-native-linuxapp-gcc/include= /rte_config.h -O3 -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonli teral -Wformat-security -Wundef -Wwrite-strings -Wno-uninitialized -Wno-unused-parameter -Wno-unused-variable -fmessage-length=3D0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=3D2 -fstack-protector-strong -funw ind-tables -fasynchronous-unwind-tables -g -Wformat -fPIC -Wno-error=3Darray-bounds -o e1000_phy.o -c /home/abuild/rpmbuild/BUILD/dpdk-2.2.0/drivers/net/e1000/base/e1000_phy.c But next time I will make sure I will add the command line that causes the problem in the comment section of the patch as well. --=20 markos SUSE LINUX GmbH | GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norto= n HRB 21284 (AG N=C3=BCrnberg) Maxfeldstr. 5, D-90409, N=C3=BCrnberg