ACK: [PATCH] uefirtvariable: clean up pedantic static analysis warnings

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


On 2021-09-22 2:56 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Static analysis is warning that attributestest may be uninitialized.
> Clean this up by setting the variable to zero.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 9f2b9dfc..095d2f64 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -129,7 +129,7 @@ static int getvariable_test(
>  	uint8_t testdata[MAX_DATA_LENGTH];
>  	uint64_t dataindex;
>  	uint64_t getdatasize = sizeof(testdata);
> -	uint32_t attributestest;
> +	uint32_t attributestest = 0;
>  
>  	uint8_t data[datasize];
>  	uint32_t i;
> 


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



More information about the fwts-devel mailing list