u-boot/lib/libavb
Ievgen Maliarenko ecc6f6bea6 libavb: Handle wrong hashtree_error_mode in avb_append_options()
Exit with AVB_SLOT_VERIFY_RESULT_ERROR_INVALID_ARGUMENT
when hashtree_error_mode value passed to avb_append_options()
is unknown (not from AvbHashtreeErrorMode enum).

Otherwise, default value is not handled in the
switch(hashtree_error_mode), which causes below compile warning:

lib/libavb/avb_cmdline.c: In function ‘avb_append_options’:
lib/libavb/avb_cmdline.c:354:13: 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:363:8: warning: ‘verity_mode’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (!cmdline_append_option(
        ^~~~~~~~~~~~~~~~~~~~~~
           slot_data, "androidboot.veritymode", verity_mode)) {

Signed-off-by: Ievgen Maliarenko <ievgen.maliarenko@globallogic.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
2018-08-24 13:19:53 -04:00
..
avb_chain_partition_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_chain_partition_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_cmdline.c libavb: Handle wrong hashtree_error_mode in avb_append_options() 2018-08-24 13:19:53 -04:00
avb_cmdline.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_crypto.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_crypto.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_footer.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_footer.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_hash_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_hash_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_hashtree_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_hashtree_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_kernel_cmdline_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_kernel_cmdline_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_ops.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_property_descriptor.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_property_descriptor.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_rsa.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_rsa.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_sha256.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_sha512.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_sha.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_slot_verify.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_slot_verify.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_sysdeps_posix.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_sysdeps.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_util.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_util.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_vbmeta_image.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_vbmeta_image.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_version.c libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
avb_version.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
libavb.h libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00
Makefile libavb: Update SPDX tag style 2018-06-19 11:55:05 -04:00