summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/cbfstool/cbfs-mkstage.c4
-rw-r--r--util/cbfstool/elfheaders.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 6aa3746bc7..2a92c9fb5a 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 d217aac0cd..5b5cf94276 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;
}