summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-02-18 18:35:00 +0800
committerHung-Te Lin <hungte@chromium.org>2013-02-18 12:28:43 +0100
commit7b654a9702640c2d9fb8c37e4ae7f6b27ca949a0 (patch)
treea23a53174197e02457e6b38b8cd830dc5afbd4e6 /util/cbfstool
parent475d42a16c0a9ce3946c1ac2b3d20c32feec4fec (diff)
downloadcoreboot-7b654a9702640c2d9fb8c37e4ae7f6b27ca949a0.tar.xz
cbfstool: Fix compile warnings caused by incorrect data types.
The "offset" in cbfs-mkpayload should be printed as type %lu instead of %d as `gcc` rightfully warns about. gcc -g -Wall -D_7ZIP_ST -c -o /srv/filme/src/coreboot/util/cbfstool/cbfs-mkpayload.o cbfs-mkpayload.c cbfs-mkpayload.c: In function ‘parse_fv_to_payload’: cbfs-mkpayload.c:284:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat] cbfs-mkpayload.c:296:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat] This warning was introduced in the following commit. commit 4610247ef1744ccabbcc6bfc441a3583aa49f7b5 Author: Patrick Georgi <patrick@georgi-clan.de> Date: Sat Feb 9 13:26:19 2013 +0100 cbfstool: Handle alignment in UEFI payloads Reviewed-on: http://review.coreboot.org/2334 Change-Id: I50c26a314723d45fcc6ff9ae2f08266cb7969a12 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: http://review.coreboot.org/2440 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/cbfs-mkpayload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c
index 6115e492c3..9f3dabf40f 100644
--- a/util/cbfstool/cbfs-mkpayload.c
+++ b/util/cbfstool/cbfs-mkpayload.c
@@ -281,7 +281,7 @@ int parse_fv_to_payload(const struct buffer *input,
fh = (ffs_file_header_t *)(input->data + fv->header_length);
while (fh->file_type == FILETYPE_PAD) {
unsigned long offset = (fh->size[2] << 16) | (fh->size[1] << 8) | fh->size[0];
- ERROR("skipping %d bytes of FV padding\n", offset);
+ ERROR("skipping %lu bytes of FV padding\n", offset);
fh = (ffs_file_header_t *)(((void*)fh) + offset);
}
if (fh->file_type != FILETYPE_SEC) {
@@ -293,7 +293,7 @@ int parse_fv_to_payload(const struct buffer *input,
cs = (common_section_header_t *)&fh[1];
while (cs->section_type == SECTION_RAW) {
unsigned long offset = (cs->size[2] << 16) | (cs->size[1] << 8) | cs->size[0];
- ERROR("skipping %d bytes of section padding\n", offset);
+ ERROR("skipping %lu bytes of section padding\n", offset);
cs = (common_section_header_t *)(((void*)cs) + offset);
}
if (cs->section_type != SECTION_PE32) {