[dpdk-dev] [PATCH] mk: use misleading indentation warning when available
Burakov, Anatoly
anatoly.burakov at intel.com
Wed Dec 19 11:05:59 CET 2018
On 19-Dec-18 9:24 AM, Gaëtan Rivet wrote:
> On Tue, Dec 18, 2018 at 02:50:30PM +0000, Ferruh Yigit wrote:
>> On 12/18/2018 10:26 AM, Gaetan Rivet wrote:
>>> -Wmisleading-indentation was introduced in GCC 6.0.
>>
>> It seems '-Wmisleading-indentation' is part of -Wall, which we already set by
>> default. If so no need to explicitly add it.
>>
>> The link I found:
>> https://www.gnu.org/software/gcc/gcc-6/porting_to.html
>>
>> copy-paste:
>> "
>> A new warning -Wmisleading-indentation was added to -Wall, warning about places
>> where the indentation of the code might mislead a human reader about the control
>> flow:
>> "
>>
>> Is there a way to confirm it is part of -Wall?
>>
>
> I think you are right, actually the check was already used.
> This is worrying, given that the original bug was not seen.
>
> This patch can be left out then, but the problem remains. Maybe an
> update to coding style is needed, or an evolution to checkpatch //
> preferably something else.
clang-format? It's not exactly a style *checker*, but if we had a
.clang-format config file included with DPDK, it would be easy to 1)
format the code properly before sending out the patches, and 2) convert
the entire DPDK codebase to the new style, should such need arise.
(also, uncrustify and other code beautifiers...)
--
Thanks,
Anatoly
More information about the dev
mailing list