diff mbox

acpi: acpidump: fix 32 bit build error

Message ID 1415024492-30854-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Nov. 3, 2014, 2:21 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Commit "acpi: acpidump: check for short length headers (LP: #1375300)"
introduced a build error because of the wrong format specifier for
the table length. 

acpi/acpidump/acpidump.c: In function 'acpidump_slit':
acpi/acpidump/acpidump.c:1059:3: error: format '%llu' expects argument of 
  type 'long long unsigned int', but argument 9 has type 'size_t' [-Werror=format]
cc1: all warnings being treated as errors

This one-liner fix addresses that bug.

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

Comments

Keng-Yu Lin Nov. 4, 2014, 8:49 a.m. UTC | #1
On Mon, Nov 3, 2014 at 10:21 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Commit "acpi: acpidump: check for short length headers (LP: #1375300)"
> introduced a build error because of the wrong format specifier for
> the table length.
>
> acpi/acpidump/acpidump.c: In function 'acpidump_slit':
> acpi/acpidump/acpidump.c:1059:3: error: format '%llu' expects argument of
>   type 'long long unsigned int', but argument 9 has type 'size_t' [-Werror=format]
> cc1: all warnings being treated as errors
>
> This one-liner fix addresses that bug.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/acpidump/acpidump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 5c1fcc1..83db7be 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -1057,7 +1057,7 @@ static void acpidump_slit(fwts_framework *fw, const fwts_acpi_table_info *table)
>
>         if (table->length < sizeof(fwts_acpi_table_slit)) {
>                 fwts_log_info_verbatum(fw, "SLIT header length too short, expected %zu "
> -                       "bytes, got %" PRIu64 " bytes instead. Aborting SLIT table dump.",
> +                       "bytes, got %zu bytes instead. Aborting SLIT table dump.",
>                         sizeof(fwts_acpi_table_slit), table->length);
>                 return;
>         }
> --
> 2.1.1
>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung Nov. 5, 2014, 2:53 a.m. UTC | #2
On 14-11-03 10:21 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Commit "acpi: acpidump: check for short length headers (LP: #1375300)"
> introduced a build error because of the wrong format specifier for
> the table length.
>
> acpi/acpidump/acpidump.c: In function 'acpidump_slit':
> acpi/acpidump/acpidump.c:1059:3: error: format '%llu' expects argument of
>    type 'long long unsigned int', but argument 9 has type 'size_t' [-Werror=format]
> cc1: all warnings being treated as errors
>
> This one-liner fix addresses that bug.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/acpidump/acpidump.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
> index 5c1fcc1..83db7be 100644
> --- a/src/acpi/acpidump/acpidump.c
> +++ b/src/acpi/acpidump/acpidump.c
> @@ -1057,7 +1057,7 @@ static void acpidump_slit(fwts_framework *fw, const fwts_acpi_table_info *table)
>   
>   	if (table->length < sizeof(fwts_acpi_table_slit)) {
>   		fwts_log_info_verbatum(fw, "SLIT header length too short, expected %zu "
> -			"bytes, got %" PRIu64 " bytes instead. Aborting SLIT table dump.",
> +			"bytes, got %zu bytes instead. Aborting SLIT table dump.",
>   			sizeof(fwts_acpi_table_slit), table->length);
>   		return;
>   	}

Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/acpidump/acpidump.c b/src/acpi/acpidump/acpidump.c
index 5c1fcc1..83db7be 100644
--- a/src/acpi/acpidump/acpidump.c
+++ b/src/acpi/acpidump/acpidump.c
@@ -1057,7 +1057,7 @@  static void acpidump_slit(fwts_framework *fw, const fwts_acpi_table_info *table)
 
 	if (table->length < sizeof(fwts_acpi_table_slit)) {
 		fwts_log_info_verbatum(fw, "SLIT header length too short, expected %zu "
-			"bytes, got %" PRIu64 " bytes instead. Aborting SLIT table dump.",
+			"bytes, got %zu bytes instead. Aborting SLIT table dump.",
 			sizeof(fwts_acpi_table_slit), table->length);
 		return;
 	}