diff options
author | Ji Luo <ji.luo@nxp.com> | 2020-08-03 19:53:15 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2022-08-05 12:46:12 +0800 |
commit | 9e1d99fe775c2a58b7048ffd9e8add4a9cf2a8e3 (patch) | |
tree | 941c40e2ed41773e00b4d49a82f307db0d4ad8f5 | |
parent | 3090507c0091b996f221bcf560285b35eff350b2 (diff) |
MA-20507-2 trusty: fix invalid type in argument to printf format specifier
Fix Coverity Issue 10473658, 10473663, 10473664 and 10473668. Use "%lu"
for "uint64_t" and "unsigned long" parameter in printf to fix the type
mismatch issue.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ic1642ab4d5aecee9676b65582b04eaca4c16d3c2
-rw-r--r-- | lib/trusty/ql-tipc/arch/arm/trusty_mem.c | 2 | ||||
-rw-r--r-- | lib/trusty/ql-tipc/sysdeps/storage_ops_uboot.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/trusty/ql-tipc/arch/arm/trusty_mem.c b/lib/trusty/ql-tipc/arch/arm/trusty_mem.c index 56d8348d3c..890dbe48bc 100644 --- a/lib/trusty/ql-tipc/arch/arm/trusty_mem.c +++ b/lib/trusty/ql-tipc/arch/arm/trusty_mem.c @@ -97,7 +97,7 @@ static void arm64_write_ATS1ExW(uint64_t vaddr) break; case 0x3: default: - trusty_fatal("Unsupported execution state: EL%u\n", _current_el ); + trusty_fatal("Unsupported execution state: EL%lu\n", _current_el ); break; } diff --git a/lib/trusty/ql-tipc/sysdeps/storage_ops_uboot.c b/lib/trusty/ql-tipc/sysdeps/storage_ops_uboot.c index 934286cb69..cf15bf77b0 100644 --- a/lib/trusty/ql-tipc/sysdeps/storage_ops_uboot.c +++ b/lib/trusty/ql-tipc/sysdeps/storage_ops_uboot.c @@ -74,7 +74,7 @@ int rpmb_storage_send(void *rpmb_dev, const void *rel_write_data, if (rel_write_size) { if (rel_write_size % MMC_BLOCK_SIZE) { trusty_error( - "rel_write_size is not a multiple of MMC_BLOCK_SIZE: %d\n", + "rel_write_size is not a multiple of MMC_BLOCK_SIZE: %lu\n", rel_write_size); ret = TRUSTY_ERR_INVALID_ARGS; goto end; @@ -90,7 +90,7 @@ int rpmb_storage_send(void *rpmb_dev, const void *rel_write_data, } if (write_size) { if (write_size % MMC_BLOCK_SIZE) { - trusty_error("write_size is not a multiple of MMC_BLOCK_SIZE: %d\n", + trusty_error("write_size is not a multiple of MMC_BLOCK_SIZE: %lu\n", write_size); ret = TRUSTY_ERR_INVALID_ARGS; goto end; @@ -105,7 +105,7 @@ int rpmb_storage_send(void *rpmb_dev, const void *rel_write_data, } if (read_size) { if (read_size % MMC_BLOCK_SIZE) { - trusty_error("read_size is not a multiple of MMC_BLOCK_SIZE: %d\n", + trusty_error("read_size is not a multiple of MMC_BLOCK_SIZE: %lu\n", read_size); ret = TRUSTY_ERR_INVALID_ARGS; goto end; |