[PATCH] acpi: acpidump: fix 32 bit build error

Keng-Yu Lin keng-yu.lin at canonical.com
Tue Nov 4 08:49:46 UTC 2014


On Mon, Nov 3, 2014 at 10:21 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at 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 at 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 at canonical.com>



More information about the fwts-devel mailing list