summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorIevgen Maliarenko <[email protected]>2018-08-14 02:43:03 +0200
committerTom Rini <[email protected]>2018-08-24 13:19:53 -0400
commitecc6f6bea6a29e43f4c559aeb642e0597cf702b2 (patch)
treeab1debcb409226d1d56db57dcbc8dd0e15cff8b0 /scripts/basic
parent3b1c0d89b992a59c4ff77bccb8a3510827593b14 (diff)
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 <[email protected]> Signed-off-by: Eugeniu Rosca <[email protected]> Reviewed-by: Igor Opaniuk <[email protected]>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions