]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools/mkeficapsule: correct printf codes
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 14 Aug 2024 12:33:44 +0000 (14:33 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 24 Aug 2024 09:34:05 +0000 (11:34 +0200)
commit2a12caf75d282e20363c69707e93eeecbfa39749
tree54b8b6fa6400737dfd8a071c34a80d10cbaeb5a9
parent3a8ad050aa8b1663316952d1d4bebdb5f4911160
tools/mkeficapsule: correct printf codes

uint64_t is defined as unsigned long long on 32-bit ARM.
Use PRIX64 for printing uint64_t.

This avoid a build failure on 32-bit systems:

    tools/mkeficapsule.c: In function 'dump_capsule_auth_header':
    tools/mkeficapsule.c:694:66: warning: format '%lX' expects argument of
    type 'long unsigned int', but argument 2 has type 'uint64_t'
    {aka 'long long unsigned int'} [-Wformat=]
    694 | printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08lX\n",
        |                                                      ~~~~^
        |                                                          |
        |                                                          long unsigned int
        |                                                      %08llX

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
tools/mkeficapsule.c