[coreboot] vboot/futility: Two Clang 5 warnings: address-of-packed-member and enum-conversion
Stefan Reinauer
stefan.reinauer at coreboot.org
Wed Oct 18 01:34:59 CEST 2017
Dear Paul,
* Paul Menzel <paulepanter at users.sourceforge.net> [171007 11:05]:
> Dear coreboot folks,
>
>
> Clang 5.0 shows the warnings below. I don’t know if Clang 4.0 also
> warns about these.
>
> ```
> CC firmware/lib/vboot_api_kernel.o
> firmware/lib/vboot_api_kernel.c:334:26: error: taking address of packed member 'kernel_version_tpm' of class or structure
> 'VbSharedDataHeader' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
> if (RollbackKernelRead(&shared->kernel_version_tpm)) {
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
> firmware/lib/vboot_api_kernel.c:512:16: error: implicit conversion from enumeration type 'enum vb2_nv_param' to different enumeration type
> 'VbNvParam' (aka 'enum VbNvParam') [-Werror,-Wenum-conversion]
> VbNvGet(&vnc, VB2_NV_DEV_BOOT_FASTBOOT_FULL_CAP,
> ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 errors generated.
> ```
Clang is not currently supported by coreboot. However, if you wish to
contribute a patch to fix above issues, it will probably get merged.
Stefan
More information about the coreboot
mailing list