Page MenuHomeFreeBSD

crunchgen(8): fix crunched application build with WARNS=6
ClosedPublic

Authored by kevans on Sep 8 2020, 8:20 PM.
Tags
None
Referenced Files
F106445063: D26363.diff
Mon, Dec 30, 9:25 PM
Unknown Object (File)
Nov 20 2024, 10:34 PM
Unknown Object (File)
Oct 9 2024, 3:20 AM
Unknown Object (File)
Oct 2 2024, 5:51 AM
Unknown Object (File)
Oct 1 2024, 7:14 AM
Unknown Object (File)
Sep 27 2024, 10:12 PM
Unknown Object (File)
Sep 24 2024, 2:36 PM
Unknown Object (File)
Sep 16 2024, 2:18 AM
Subscribers

Details

Summary

This was revealed by the rescue build with a patch I'm working on to default WARNS=6 everywhere. The main issues were:

  • Missing prototype for _crunched_${ident}_stub in the *_stub.c generated bits
  • Missing prototype for crunched_main
  • Incomplete prototype for _crunched_${ident}_stub in the generated parts of crunched_main
  • Literal strings in the stub table must drop const qualifier, unless we const'ify name
  • f field in struct stub didn't have a proper prototype

Most of these issues are minor formalities and easily addressed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 33447

Event Timeline

kevans requested review of this revision.Sep 8 2020, 8:20 PM

LGTM. I probably wouldn't bother with the typedef and just add the parameters but don't mind either way.

usr.sbin/crunch/crunchgen/crunched_main.c
83
91
usr.sbin/crunch/crunchgen/crunchgen.c
938
This revision is now accepted and ready to land.Sep 9 2020, 8:16 AM

LGTM. I probably wouldn't bother with the typedef and just add the parameters but don't mind either way.

I don't feel too strongly about the typedef, personally- I added it when I had this grand delusion of a header that I could eventually move it to so both crunched_main and the stub objects have a consistent idea of the signature. I realized that would be both silly and annoying, but kept the typedef to prove to myself consistency between the crunched_main signature and the entry point callbacks.