From: Tom Rini Date: Fri, 1 Nov 2019 09:29:20 -0400 Subject: [U-Boot] [PATCH 2/2] libavb: Fix build warnings after updating the lib In-Reply-To: <20190815200403.1152-2-semen.protsenko@linaro.org> References: <20190815200403.1152-1-semen.protsenko@linaro.org> <20190815200403.1152-2-semen.protsenko@linaro.org> Message-ID: <20191101132920.GT11173@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 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: