ACK: [PATCH] lib: fwts_acpi_object_eval: fix build error on i386

Colin Ian King colin.king at canonical.com
Tue Jun 23 08:16:29 UTC 2020


On 23/06/2020 09:14, Ivan Hu wrote:
> the commit 87c45ec17740a37b13182453174ae80e55503900
> fwts_acpi_object_eval: add a function to check buffer size
> 
> causes build error on i386
> fwts_acpi_object_eval.c:590:4: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘size_t {aka unsigned int}’ [-Werror=format=]
>     "%s should return a buffer of %" PRIu64 " bytes, "
>     ^
> ../../../src/lib/include/fwts_framework.h:236:76: note: in definition of macro ‘fwts_failed’
> 
> fix the format.
> 
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/lib/src/fwts_acpi_object_eval.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
> index 31484941..4a9084bc 100644
> --- a/src/lib/src/fwts_acpi_object_eval.c
> +++ b/src/lib/src/fwts_acpi_object_eval.c
> @@ -587,7 +587,7 @@ int fwts_method_buffer_size(
>  	if (obj->Buffer.Length != buf_size) {
>  		fwts_failed(fw, LOG_LEVEL_CRITICAL,
>  			"MethodBadBufferSize",
> -			"%s should return a buffer of %" PRIu64 " bytes, "
> +			"%s should return a buffer of %zd bytes, "
>  			"but instead returned %" PRIu32 " bytes.",
>  			name, buf_size, obj->Buffer.Length);
>  		return FWTS_ERROR;
> 
Thanks Ivan. 32 bit is definitely the ignored build option during
development.

Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list