Skip to content
Commit 8d4c2c77 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

efi_loader: fix efi_ecpt_register()



num_entries should be unsigned to avoid warnings. As the target field is
u16 we should use this type.

    lib/efi_loader/efi_conformance.c: In function ‘efi_ecpt_register’:
    lib/efi_loader/efi_conformance.c:30:33: warning:
    conversion to ‘long unsigned int’ from ‘int’ may change
    the sign of the result [-Wsign-conversion]
       30 |         ecpt_size = num_entries * sizeof(efi_guid_t)
          |                                 ^
    lib/efi_loader/efi_conformance.c:46:36: warning:
    conversion from ‘int’ to ‘u16’ {aka ‘short unsigned int’}
    may change value [-Wconversion]
       46 |         ecpt->number_of_profiles = num_entries;
          |                                    ^~~~~~~~~~~

Fixes: 6b92c173 ("efi: Create ECPT table")
Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
parent 60e3fedc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment