[U-Boot] [PATCH 2/2] libavb: Fix build warnings after updating the lib

Tom Rini trini at konsulko.com
Fri Nov 1 13:29:20 UTC 2019


On Thu, Aug 15, 2019 at 11:04:03PM +0300, Sam Protsenko wrote:

> After updating libavb to most recent version from AOSP/master, two new
> warnings appear:
> 
> Warning #1:
> 
>     lib/libavb/avb_cmdline.c: In function 'avb_append_options':
>     lib/libavb/avb_cmdline.c:365:15: warning: 'dm_verity_mode' may be
>                                      used uninitialized in this function
>                                      [-Wmaybe-uninitialized]
>          new_ret = avb_replace(
>                    ^~~~~~~~~~~~
>              slot_data->cmdline, "$(ANDROID_VERITY_MODE)", dm_verity_mode);
>              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     lib/libavb/avb_cmdline.c:374:8: warning: 'verity_mode' may be used
>                                     uninitialized in this function
>                                     [-Wmaybe-uninitialized]
>        if (!cmdline_append_option(
>             ^~~~~~~~~~~~~~~~~~~~~~
>                slot_data, "androidboot.veritymode", verity_mode)) {
>                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Warning #2:
> 
>     lib/libavb/avb_slot_verify.c: In function 'avb_slot_verify':
>     lib/libavb/avb_slot_verify.c:1349:23: warning: 'ret' may be used
>                                           uninitialized in this function
>                                           [-Wmaybe-uninitialized]
>        AvbSlotVerifyResult ret;
>                            ^~~
> 
> Fix those by providing default return values to affected functions.
> 
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191101/1fa86699/attachment.sig>


More information about the U-Boot mailing list