[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    [PATCH] acpi: madt: fix incorrect format specifier for size_t
From:       Colin King <colin.king () canonical ! com>
Date:       2016-01-30 13:51:13
Message-ID: 1454161873-16279-1-git-send-email-colin.king () canonical ! com
[Download RAW message or body]

From: Colin Ian King <colin.king@canonical.com>

32 bit builds are failing with:

In file included from ../src/lib/include/fwts_binpaths.h:27:0,
                 from ../src/lib/include/fwts.h:40,
                 from acpi/madt/madt.c:16:
acpi/madt/madt.c: In function 'madt_local_sapic':
acpi/madt/madt.c:644:8: error: format '%ld' expects argument of type 'long int',
but argument 9 has type 'size_t {aka unsigned int}' [-Werror=format=]
        "MADT %s length of %d bytes does not match "
        ^
../src/lib/include/fwts_framework.h:229:76: note: in definition of macro 'fwts_failed'
  fwts_framework_log(fw, LOG_FAILED, label, level, &fw->minor_tests.failed, fmt, ## args)

use the %zd format specifier for size_t types

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/madt/madt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index 2c06d2c..15bfe10 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -642,7 +642,7 @@ static int madt_local_sapic(fwts_framework *fw,
 		fwts_failed(fw, LOG_LEVEL_MEDIUM,
 			    "MADTLSAPICLength",
 			    "MADT %s length of %d bytes does not match "
-			    "actual length of %ld bytes.",
+			    "actual length of %zd bytes.",
 			    madt_sub_names[hdr->type], hdr->length,
 			    strlen(lsapic->uid_string) + 16);
 	else
-- 
2.7.0


-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic