Project

General

Profile

Bug #7871

libm: misleading-indentation errors

Added by Toomas Soome almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
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)
     ^~
#1

Updated by Marcel Telka almost 4 years ago

  • Description updated (diff)
#2

Updated by Gordon Ross almost 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)

#3

Updated by Toomas Soome almost 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.

#4

Updated by Electric Monk over 3 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>

Also available in: Atom PDF