Enable warnings in EFI boot code

Authored by smh on Jan 9 2016, 3:49 AM.



Set WARNS if not set for EFI boot code and fix the issues highlighted by setting it.

Most components are set to WARNS level 6 with few being left at lower levels due to the amount of changes needed to fix at higher levels.

Test Plan

make buildenv
cd sys/boot/efi
make clean

Once built boot using the created boot.efifat image under qemu.


make tinderbox JFLAG=-j24 MAKE_JUST_WORLDS=1

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
smh retitled this revision from to Enable warnings in EFI boot code.Jan 9 2016, 3:49 AM
smh updated this object.
smh edited the test plan for this revision. (Show Details)
smh added a reviewer: emaste.
smh updated this revision to Diff 12070.Jan 9 2016, 3:55 AM

Restore removed blank line and correct spacing highlighted by phabricator view.

smh updated this revision to Diff 12111.Jan 11 2016, 10:20 AM

Additional spacing fix

emaste added inline comments.Jan 11 2016, 1:04 PM
5–6 ↗(On Diff #12111)

This makefile doesn't build anything, so this will have no effect?

7–8 ↗(On Diff #12111)

Seems WARNS conventionally goes after PROG= etc. in other Makefiles.

29–30 ↗(On Diff #12111)

Looks good, but I'd suggest removing the line continuation (even though it's then longer than 80 cols) to reduce diffs with other versions of this file.

Here's NetBSD's, which seems to come via gnu-efi:


    { 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29} }

I'd say we should follow that formatting.

smh updated this revision to Diff 12116.Jan 11 2016, 1:33 PM

Address feedback from emaste:

  • Remove WARNS from sys/boot/efi/Makefile as it has no effect
  • Move WARNS below PROG= etc
  • Remove split of GUID / PROTOCOL defines even though they break style(9) 80 col limit, to reduce diff and match NetBSD.
smh marked 3 inline comments as done.Jan 11 2016, 1:35 PM
smh updated this revision to Diff 12117.Jan 11 2016, 2:48 PM

Spacing changes for GUID / PROTOCOL structs requested emaste

smh updated this revision to Diff 12126.Jan 11 2016, 8:46 PM

Fix ARM warnings highlighted by tinderbox.

smh edited the test plan for this revision. (Show Details)Jan 12 2016, 2:08 AM
This revision was automatically updated to reflect the committed changes.