ACK: [PATCH] acpi: s3power: clean up pedantic static analysis warnings

Alex Hung alex.hung at canonical.com
Wed Sep 22 19:06:48 UTC 2021


On 2021-09-22 2:59 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Static analysis is warning that variable status may be uninitialized.
> Clean this up by setting the variable to FWTS_OK.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpi/s3power/s3power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/s3power/s3power.c b/src/acpi/s3power/s3power.c
> index f47ff8bb..4633ef30 100644
> --- a/src/acpi/s3power/s3power.c
> +++ b/src/acpi/s3power/s3power.c
> @@ -176,7 +176,7 @@ static int wrap_pmutils_do_suspend(fwts_pm_method_vars *fwts_settings,
>  	int *duration,
>  	const char *command)
>  {
> -	int status;
> +	int status = FWTS_OK;
>  
>  	fwts_progress_message(fwts_settings->fw, percent, "(Suspending)");
>  	time(&(fwts_settings->t_start));
> 

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



More information about the fwts-devel mailing list