qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 3/3] tpm_tis: fix format string specifier in tpm_


From: Liam Merwick
Subject: [Qemu-devel] [PATCH v2 3/3] tpm_tis: fix format string specifier in tpm_tis_show_buffer()
Date: Mon, 11 Feb 2019 15:03:05 +0000

cppcheck reports:

[hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires 'int' 
but the argument type is 'unsigned int'

Fix this by using %u instead of %d

Signed-off-by: Liam Merwick <address@hidden>
---
 hw/tpm/tpm_tis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 860c2ace7d99..395500e8a61d 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -110,7 +110,7 @@ static void tpm_tis_show_buffer(const unsigned char *buffer,
     uint32_t len, i;
 
     len = MIN(tpm_cmd_get_size(buffer), buffer_size);
-    printf("tpm_tis: %s length = %d\n", string, len);
+    printf("tpm_tis: %s length = %u\n", string, len);
     for (i = 0; i < len; i++) {
         if (i && !(i % 16)) {
             printf("\n");
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]