aboutsummaryrefslogtreecommitdiffstats
path: root/util/cbfstool/elfheaders.c
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2014-03-16 00:15:57 +0100
committerAaron Durbin <adurbin@gmail.com>2014-05-27 15:43:08 +0200
commit470c37c372b6b6a6961a3b287f609f55c15f6d4c (patch)
tree706500399f43386a85a9bf8abf1e73056095097a /util/cbfstool/elfheaders.c
parentf2f7f03aff2df2471fce08f48bb0a6583263158e (diff)
downloadcoreboot-470c37c372b6b6a6961a3b287f609f55c15f6d4c.tar.gz
coreboot-470c37c372b6b6a6961a3b287f609f55c15f6d4c.tar.xz
coreboot-470c37c372b6b6a6961a3b287f609f55c15f6d4c.zip
util/cbfstool: Use `%zu` instead of `%ld` for size_t arguments
cbfstool fails to built under 32-bit platforms since commit aa2f739a cbfs: fix issues with word size and endianness. due to the use of '%ld' format specifier on size_t, which on these platforms is only 32-bit. No error is seen though, when cbfstool is built, when building a coreboot image, where it is put in `build/cbfstool`. Use the length modifier `z` for size_t arguments, and cast to size_t where appropriate. Change-Id: Id84a20fbf237376a31f7e4816bd139463800c977 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/5388 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@gmail.com>
Diffstat (limited to 'util/cbfstool/elfheaders.c')
-rw-r--r--util/cbfstool/elfheaders.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index d217aac0c..5b5cf9427 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -147,7 +147,7 @@ check_size(const struct buffer *b, size_t offset, size_t size, const char *desc)
if (offset >= buffer_size(b) || (offset + size) > buffer_size(b)) {
ERROR("The file is not large enough for the '%s'. "
- "%ld bytes @ offset %zu, input %zu bytes.\n",
+ "%zu bytes @ offset %zu, input %zu bytes.\n",
desc, size, offset, buffer_size(b));
return -1;
}