[U-Boot] efi_selftest_unicode_collation.c: build warning

Bin Meng bmeng.cn at gmail.com
Fri Nov 16 15:13:45 UTC 2018


Hi,

Build qemu-riscv32_defconfig with CONFIG_CMD_BOOTEFI_SELFTEST=y, the
following build warnings were seen.

In file included from lib/efi_selftest/efi_selftest_unicode_collation.c:10:0:
lib/efi_selftest/efi_selftest_unicode_collation.c: In function 'test_stri_coll':
lib/efi_selftest/efi_selftest_unicode_collation.c:55:4: warning:
format '%zu' expects argument of type 'size_t', but argument 5 has
type 'ssize_t {aka long int}' [-Wformat=]
    "stri_coll(\"%ps\", \"%ps\") = %zu\n", c1, c2, ret);
    ^
include/efi_selftest.h:33:30: note: in definition of macro 'efi_st_error'
  efi_st_printc(EFI_LIGHTRED, __VA_ARGS__))
                              ^~~~~~~~~~~
lib/efi_selftest/efi_selftest_unicode_collation.c:63:4: warning:
format '%zu' expects argument of type 'size_t', but argument 5 has
type 'ssize_t {aka long int}' [-Wformat=]
    "stri_coll(\"%ps\", \"%ps\") = %zu\n", c1, c3, ret);
    ^
include/efi_selftest.h:33:30: note: in definition of macro 'efi_st_error'
  efi_st_printc(EFI_LIGHTRED, __VA_ARGS__))
                              ^~~~~~~~~~~
lib/efi_selftest/efi_selftest_unicode_collation.c:71:4: warning:
format '%zu' expects argument of type 'size_t', but argument 5 has
type 'ssize_t {aka long int}' [-Wformat=]
    "stri_coll(\"%ps\", \"%ps\") = %zu\n", c3, c1, ret);
    ^
include/efi_selftest.h:33:30: note: in definition of macro 'efi_st_error'
  efi_st_printc(EFI_LIGHTRED, __VA_ARGS__))
                              ^~~~~~~~~~~

Could you please take a look?

Regards,
Bin


More information about the U-Boot mailing list