diff options
author | Victor Chong <victor.chong@linaro.org> | 2021-01-22 14:41:21 +0000 |
---|---|---|
committer | vchong <7334750+vchong@users.noreply.github.com> | 2021-02-05 02:09:39 +0900 |
commit | d129eb53d66bbf11e5ac783a88e00a98bdd3ab55 (patch) | |
tree | 94cadb378c5b406f10005f8696a45a6b44ade2e9 | |
parent | 1970688cc1035d59382f2f9cd2bd5884a4d982e4 (diff) | |
download | apps-d129eb53d66bbf11e5ac783a88e00a98bdd3ab55.tar.gz |
km: ta: fix build warnings
Workaround 'variable set but not used [-Wunused-but-set-variable]'
warnings.
Fix print format warnings.
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Acked-by: Ruchika Gupta <ruchika.gupta@linaro.org>
-rw-r--r-- | keymaster/ta/mbedtls_proxy.c | 2 | ||||
-rw-r--r-- | keymaster/ta/parsel.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/keymaster/ta/mbedtls_proxy.c b/keymaster/ta/mbedtls_proxy.c index 149cd8a..45a05ca 100644 --- a/keymaster/ta/mbedtls_proxy.c +++ b/keymaster/ta/mbedtls_proxy.c @@ -220,6 +220,7 @@ static keymaster_error_t convert_epoch_to_date_str(uint32_t sec, days_since_epoch = epoch; /* Calculating WeekDay */ ntp_week_day = week_days[days_since_epoch % 7]; + DMSG("ntp_week_day = %u", ntp_week_day); /* ball parking year, may not be accurate! */ ntp_year = 1970 + (days_since_epoch / 365); @@ -242,6 +243,7 @@ static keymaster_error_t convert_epoch_to_date_str(uint32_t sec, month_days[1] = 29; /* if current year is leap, set indicator to 1 */ leap_year_ind = 1; + DMSG("leap_year_ind = %u", leap_year_ind); } else { /* February = 28 days for non-leap years */ month_days[1] = 28; diff --git a/keymaster/ta/parsel.c b/keymaster/ta/parsel.c index f44df3f..331609a 100644 --- a/keymaster/ta/parsel.c +++ b/keymaster/ta/parsel.c @@ -27,13 +27,15 @@ bool TA_is_out_of_bounds(uint8_t *ptr, uint8_t *end, size_t size) if (end) { if (ADD_OVERFLOW((uintptr_t)ptr, size, &res)) { - DMSG("ptr = 0x%x, end = 0x%x, size = %zu", ptr, end, + DMSG("ptr = 0x%" PRIXPTR ", end = 0x%" PRIXPTR + ", size = %zu", (uintptr_t)ptr, (uintptr_t)end, size); EMSG("Pointer overflow detected - Abort!"); return true; } if (res > (uintptr_t)end) { - DMSG("ptr = 0x%x, end = 0x%x, size = %zu", ptr, end, + DMSG("ptr = 0x%" PRIXPTR ", end = 0x%" PRIXPTR + ", size = %zu", (uintptr_t)ptr, (uintptr_t)end, size); EMSG("Pointer out of bounds!"); return true; |