Bug #7871
libm: misleading-indentation errors
Start date:
2017-02-15
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
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) ^~
Updated by Gordon Ross about 4 years ago
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)
Updated by Toomas Soome about 4 years ago
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.
Updated by Electric Monk almost 4 years ago
- 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>