Page MenuHomeFreeBSD

Fix misleading indentation in arm64's identcpu
ClosedPublic

Authored by dim on Feb 28 2020, 6:18 AM.
Tags
None
Referenced Files
F103404178: D23871.diff
Sun, Nov 24, 2:05 PM
Unknown Object (File)
Fri, Nov 22, 4:41 PM
Unknown Object (File)
Mon, Nov 18, 12:00 PM
Unknown Object (File)
Mon, Nov 18, 10:17 AM
Unknown Object (File)
Sun, Nov 17, 11:58 AM
Unknown Object (File)
Fri, Nov 15, 1:17 AM
Unknown Object (File)
Oct 20 2024, 10:44 PM
Unknown Object (File)
Oct 4 2024, 2:30 PM
Subscribers

Details

Summary

Clang 10.0.0 produces the following -Werror warning:

sys/arm64/arm64/identcpu.c:1170:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
                                break;
                                ^
sys/arm64/arm64/identcpu.c:1168:4: note: previous statement is here
                        if (fv[j].desc[0] != '\0')
                        ^

It appears the break statement is supposed to belong to the if
statement just before it, so add some braces to make it so.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

There should be at most one field to print in the inner loop. The break outside the if block is correct, just at the wrong indentation level.

Remove braces, and put break after the if statement.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 29 2020, 2:11 PM
This revision was automatically updated to reflect the committed changes.