Page MenuHomeFreeBSD

Fix parsing rule of loader's -S flag
AbandonedPublic

Authored by lwhsu on Feb 15 2018, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 8:23 AM
Unknown Object (File)
Sep 28 2023, 10:14 AM
Unknown Object (File)
Dec 19 2022, 6:12 PM
Subscribers
None

Details

Summary

r329269 seems broke the parsing rule of -S flag, try to fix it and keep the new style.

BTW, if the style in old version (r325834) is acceptable, maybe we should just revert this part to keep the code concise.

Found by gcc build: (this actually a false positive but I found the bug while checking it.)

/workspace/src/stand/i386/boot2/boot2.c:395:16: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      if (j > 0 && i == -'0') {
          ~~~~~~^~~~~~~~~~~~

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15071
Build 15166: arc lint + arc unit

Event Timeline

I suggest just going back to the old inline assignment. It's not very pretty, but neither is the duplicate assignment to "i" in this diff.

The change was reverted, I think we can close this.