Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5388
-gerrit
commit b51f6b9a111ab4b06b912e9a1bcde054db948e03
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 16 00:15:57 2014 +0100
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 when building a coreboot image which indirectly
builds cbfstool at `build/cbfstool` too.
Use the length modifier `z` for size_t arguments, and cast to size_t where
apropriate.
Change-Id: Id84a20fbf237376a31f7e4816bd139463800c977
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/cbfstool/cbfs-mkstage.c | 4 ++--
util/cbfstool/elfheaders.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 6aa3746..2a92c9f 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -132,8 +132,8 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
continue;
if (input->size < (phdr[i].p_offset + phdr[i].p_filesz)){
ERROR("Underflow copying out the segment."
- "File has %ld bytes left, segment end is %ld\n",
- input->size, phdr[i].p_offset + phdr[i].p_filesz);
+ "File has %zu bytes left, segment end is %zu\n",
+ input->size, (size_t)(phdr[i].p_offset + phdr[i].p_filesz));
return -1;
}
memcpy(buffer + (l_start - data_start),
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index f3ed05c..816278f 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;
}
the following patch was just integrated into master:
commit a00ce09cd2890b191ecfbd7b0b0b2001e47b0d17
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sun Mar 16 20:42:40 2014 +1100
mainboard/lenovo/x230 Fix usage of GNU field designator extension
In C99 we defined a syntax for this. GCC's old syntax was deprecated.
Change-Id: If8c53b5370be9101b9e5f2dfa88a6229f500a0f6
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/5392 for details.
-gerrit
the following patch was just integrated into master:
commit 774c89762a1a3f48d1d9c2e07b6a2740e725b1b0
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Thu Feb 20 19:37:42 2014 +1100
romcc.c: Fixes warning about unused function from unused macros.
GCC suppresses warnings about unused static functions if they are
inline, however Clang only does this for header files. None of these
MASK_ declarations are used, so just remove them.
Change-Id: Ia230beba3f6367237838d9b3d90536459e1d52cb
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/5273 for details.
-gerrit