Re: [coreboot] vboot/futility: Two Clang 5 warnings: address-of-packed-member and enum-conversion

2017-10-17 Thread Stefan Reinauer
Dear Paul,

* Paul Menzel  [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.
> 
> ```
> CCfirmware/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

-- 
coreboot mailing list: coreboot@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot

[coreboot] vboot/futility: Two Clang 5 warnings: address-of-packed-member and enum-conversion

2017-10-07 Thread Paul Menzel
Dear coreboot folks,


Clang 5.0 shows the warnings below. I don’t know if Clang 4.0 also
warns about these.

```
CCfirmware/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.
```


Thanks,

Paul

signature.asc
Description: This is a digitally signed message part
-- 
coreboot mailing list: coreboot@coreboot.org
https://mail.coreboot.org/mailman/listinfo/coreboot