On 13.06.2016 4:53, Hadrien Boizard wrote:
Hi Nikolay,
I'm using gcc 6.1.1 and I'm getting "-Wmisleading-indentation" warnings.
I didn't notice when I sent the patch but there's an indent that I
didn't mean to be there.
It's weird because on my file, it looks like that :
if (len == -1) goto end;
buf += len; size -= len;
Perhaps this format would be more appropriate :
if (len == -1)
goto end;
buf += len; size -= len;
Is there a problem with this version of gcc ?
Should I try resending the patch with either of these 2 solutions ?
Personally I don't think code needs fixing just to silence this warning.
But if we care, looks like it's enough to have everything after 'goto
end;' on a separate line, indented with spaces.
2016-06-12 21:46 GMT+02:00 Nikolay Sivov <bunglehead@gmail.com
mailto:bunglehead@gmail.com>:
Hi, Hadrien.
What is the compiler you're testing with and what kind of warnings do
you see? Is it misleading indentation from gcc 6 by any chance?
> - if (len == -1) goto end; buf += len; size -= len;
> + if (len == -1) goto end;
> + buf += len; size -= len;
Reformatting it like that is even more misleading.