Page MenuHomeFreeBSD

Fix misleading indentation in arm64's identcpu
ClosedPublic

Authored by dim on Feb 28 2020, 6:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 12, 8:37 AM
Unknown Object (File)
Thu, Jan 9, 1:33 AM
Unknown Object (File)
Dec 1 2024, 7:37 AM
Unknown Object (File)
Nov 24 2024, 2:05 PM
Unknown Object (File)
Nov 22 2024, 4:41 PM
Unknown Object (File)
Nov 18 2024, 12:00 PM
Unknown Object (File)
Nov 18 2024, 10:17 AM
Unknown Object (File)
Nov 17 2024, 11:58 AM
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.