[dpdk-dev] [PATCH] e1000/base: Add missing braces to the 'if' statements

Bruce Richardson bruce.richardson at intel.com
Mon Jun 27 16:39:48 CEST 2016


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 >= 6:
> 
> drivers/net/e1000/base/e1000_phy.c:4156:2:
> error: this 'if' clause does not guard... [-Werror=misleading-indentation]
> 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_mphy':
> drivers/net/e1000/base/e1000_phy.c:4221:2:
> error: this 'if' clause does not guard... [-Werror=misleading-indentation]
> 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 <mchandras at suse.de>
> ---

Any particular compiler flags needed to reproduce this issue? Compiling with
gcc6.1 I don't see any errors reported.

/Bruce


More information about the dev mailing list