Bug #7871
closed
libm: misleading-indentation errors
Added by Toomas Soome over 5 years ago.
Updated over 5 years ago.
Category:
lib - userland libraries
Description
../common/C/sincospi.c: In function 'sincospi':
../common/C/sincospi.c:158:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
else
^~~~
../common/C/sincospi.c:167:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
y = (n & 2) == 0 ? 0.0 : 1.0;
^
../common/C/sincospi.c:178:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
else
^~~~
../common/C/sincospi.c:180:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
if ((n & 4) != 0)
^~
- Description updated (diff)
Why not just turn off "misleading indentation" errors for most of these?
(not specifically about this bug, but all the "misleading indentation" warnings in general)
Gordon Ross wrote:
Why not just turn off "misleading indentation" errors for most of these?
Why would we even bother with all those reviews and checks? Our code really is quite bad, silencing the lint and suppressing warnings do not make it better.
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 709db5a3061407b4bc5fa69b7edf4c86f58ce9f6
commit 709db5a3061407b4bc5fa69b7edf4c86f58ce9f6
Author: Toomas Soome <tsoome@me.com>
Date: 2017-03-14T05:35:42.000Z
7871 libm: misleading-indentation errors
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Julien Gueytat <contact@jgueytat.fr>
Approved by: Robert Mustacchi <rm@joyent.com>
Also available in: Atom
PDF