Page MenuHomeFreeBSD

fortune: Unindent a debug printf in get_fort().
ClosedPublic

Authored by jhb on Sep 29 2022, 10:29 PM.
Tags
None
Referenced Files
F103505682: D36815.diff
Mon, Nov 25, 8:55 PM
Unknown Object (File)
Sep 30 2024, 2:21 PM
Unknown Object (File)
Sep 30 2024, 1:38 PM
Unknown Object (File)
Sep 27 2024, 1:28 PM
Unknown Object (File)
Sep 21 2024, 12:47 PM
Unknown Object (File)
Sep 6 2024, 11:46 PM
Unknown Object (File)
Sep 5 2024, 3:43 AM
Unknown Object (File)
Sep 4 2024, 3:46 PM
Subscribers

Details

Summary

The debug printf is intended to execute after the loop has ended to
log the selected file.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 47629
Build 44516: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Sep 29 2022, 10:29 PM

IMO we ought to add { } to the for loop to make this clear.

Did a GCC warning identify this?

This revision is now accepted and ready to land.Sep 30 2022, 2:28 PM

+1 for the {}. but it's up to you.

Yes, this was -Wmisleading-indentation. I think we currently make that a non-fatal error for clang. We should perhaps see what happens if we make it fatal for clang.

This revision was automatically updated to reflect the committed changes.