ACK: [PATCH] acpi: madt: fix incorrect format specifier for size_t

ivanhu ivan.hu at canonical.com
Thu Feb 4 02:58:25 UTC 2016



On 2016年01月30日 21:51, Colin King wrote:
> From: Colin Ian King <colin.king at 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 at 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
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list