ACK: [PATCH] acpi: method use correct format specifier for uint32_t type

Alex Hung alex.hung at canonical.com
Tue Jun 13 00:24:18 UTC 2017


On 2017-06-12 08:02 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Use PRIu32 rather thad d as a format specifier for uint32_t type. Fixes
> cppcheck warning:
> 
> (warning) %d in format string (no. 1) requires 'int' but the argument
> type is 'unsigned int'.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/method/method.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 068aa5ed..b957f798 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -6464,7 +6464,7 @@ static int method_test_WAK(fwts_framework *fw)
>   		ACPI_OBJECT arg[1];
>   		char name[6];
>   
> -		snprintf(name, sizeof(name), "_S%1d_", i);
> +		snprintf(name, sizeof(name), "_S%1" PRIu32 "_", i);
>   		if (fwts_acpi_object_exists(name) == NULL)
>   			continue;
>   
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list