summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/ecst.c20
-rw-r--r--util/ecst.h1
2 files changed, 8 insertions, 13 deletions
diff --git a/util/ecst.c b/util/ecst.c
index 0680f8b1e8..f7409941c0 100644
--- a/util/ecst.c
+++ b/util/ecst.c
@@ -71,7 +71,7 @@ static int splice_into_path(char *result, const char *path, int resultsz,
"\n\nfilename '%s' with prefix '%s' too long\n\n",
path, prefix);
my_printf(TINF,
- "\n\n%d + %d + 1 needs to fit in %d bytes\n\n",
+ "\n\n%zu + %zu + 1 needs to fit in %d bytes\n\n",
strlen(path), strlen(prefix), resultsz);
return FALSE;
}
@@ -717,8 +717,7 @@ int main(int argc, char *argv[])
if ((main_temp & ADDR_16_BYTES_ALIGNED_MASK)
!= 0) {
my_printf(TERR,
- "\nFW Image address (0x%08X)");
- my_printf(TERR,
+ "\nFW Image address (0x%08X)"
" isn't 16-bytes aligned !\n",
main_temp);
main_status = FALSE;
@@ -1364,11 +1363,10 @@ int main_bin(struct tbinparams binary_params)
if (((int)binary_params.fw_hdr_offset < 0) ||
(binary_params.fw_hdr_offset > bin_file_size_bytes)) {
my_printf(TERR,
- "\nFW header offset 0x%08x (%d) should be in the",
- binary_params.fw_hdr_offset);
- my_printf(TERR,
+ "\nFW header offset 0x%08x (%d) should be in the"
" range of 0 and file size (%d).\n",
binary_params.fw_hdr_offset,
+ binary_params.fw_hdr_offset,
bin_file_size_bytes);
return FALSE;
}
@@ -1889,9 +1887,7 @@ int calc_header_crc_bin(unsigned int *p_cksum)
*/
if (g_verbose == SUPER_VERBOSE) {
if (i%line_print_size == 0)
- my_printf(TDBG,
- "\n[%.4x]: ",
- g_header_array + i);
+ my_printf(TDBG, "\n[%.4x]: ", i);
my_printf(TDBG, "%.2x ", g_header_array[i]);
}
@@ -2101,11 +2097,9 @@ int main_hdr(void)
ptr_fw_addr);
} else {
my_printf(TERR,
- "\n\nCouldn't write signature (%x) and ",
- tmp_long_val);
- my_printf(TERR,
+ "\n\nCouldn't write signature (%x) and "
"pointer to BootLoader header file (%s)\n\n",
- ptr_fw_addr, tmp_file_name);
+ tmp_long_val, tmp_file_name);
return FALSE;
}
diff --git a/util/ecst.h b/util/ecst.h
index 7470b3ab6c..423f65a102 100644
--- a/util/ecst.h
+++ b/util/ecst.h
@@ -269,6 +269,7 @@ int read_from_file(unsigned int offset,
char *print_string);
/* Nice Particular Printf - General */
+__attribute__((__format__(__printf__, 2, 3)))
void my_printf(int error_level, char *fmt, ...);
int str_cmp_no_case(const char *s1, const char *s2);