[PATCH] acpi: nfit: change %x to marco PRIx32 for portability

Alex Hung alex.hung at canonical.com
Mon Aug 15 01:40:23 UTC 2016


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/acpi/nfit/nfit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/acpi/nfit/nfit.c b/src/acpi/nfit/nfit.c
index 253070e..ae115b5 100644
--- a/src/acpi/nfit/nfit.c
+++ b/src/acpi/nfit/nfit.c
@@ -51,7 +51,7 @@ static int nfit_test1(fwts_framework *fw)
 {
 	fwts_acpi_table_nfit *nfit = (fwts_acpi_table_nfit*) table->data;
 	fwts_acpi_table_nfit_struct_header *entry;
-	size_t offset;
+	uint32_t offset;
 	bool passed = true;
 
 	fwts_log_info_verbatim(fw, "NFIT NVDIMM Firmware Interface Table:");
@@ -79,8 +79,8 @@ static int nfit_test1(fwts_framework *fw)
 		if (entry->length == 0) {
 			passed = false;
 			fwts_failed(fw, LOG_LEVEL_HIGH, "NFITLengthZero",
-				    "NFIT Subtable (offset 0x%x) length "
-				    "cannot be 0", (int)offset);
+				    "NFIT Subtable (offset 0x%4.4" PRIx32 ") "
+				    "length cannot be 0", offset);
 			break;
 		}
 
-- 
2.7.4




More information about the fwts-devel mailing list