summaryrefslogtreecommitdiff
path: root/Documentation/cbfstool/index.md
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2021-05-21 10:37:38 +0200
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-05-26 15:12:31 +0000
commite84a014ee6121424593ded21591c3e759847b784 (patch)
tree7f80e897f920dacd27f3483a2cab0940d5cad41d /Documentation/cbfstool/index.md
parentef41e8a44c4c6e69ecfcb257fcbc585e8f02a64e (diff)
ec/google/wilco/mailbox: Fix format warning by using size_t length modifier
Building google/sarien with a 64-bit compiler (x86_64-linux-gnu) fails with the error below. src/ec/google/wilco/mailbox.c: In function 'wilco_ec_transfer': src/ec/google/wilco/mailbox.c:184:43: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 184 | printk(BIOS_ERR, "%s: data too short (%lu bytes, expected %zu)", | ~~^ | | | long unsigned int | %u 185 | __func__, rs.data_size - skip_size, msg->response_size); | ~~~~~~~~~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} `data_size` has type `uint16_t`, and `skip_size` has type `size_t`, whose size differs in 32-bit (unsigned int) and 64-bit (unsigned long). So use the length modifier `z` for a `size_t` argument. Found-by: x86_64-linux-gnu-gcc-10 (Debian 10.2.1-6) 10.2.1 20210110 Change-Id: Ida27323daeed9b8ff487302d0f3d6fcce0bbb705 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54786 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Duncan Laurie
Diffstat (limited to 'Documentation/cbfstool/index.md')
0 files changed, 0 insertions, 0 deletions