ACK: [PATCH] efi: uefirtvariable: fix build error on Ubuntu Precise

Alex Hung alex.hung at canonical.com
Thu Mar 5 06:43:59 UTC 2015


On 03/04/2015 05:03 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Initialise return value in ret, fixes build warning from gcc:
> 
> uefi/uefirtvariable/uefirtvariable.c: In function 'getnextvariable_test1':
> uefi/uefirtvariable/uefirtvariable.c:302:6: error: 'ret' may be used
>   uninitialized in this function [-Werror=uninitialized]
> cc1: all warnings being treated as errors
> make[4]: *** [uefi/uefirtvariable/fwts-uefirtvariable.o] Error 1
> 
> 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 ee41144..d47f50e 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -299,7 +299,7 @@ static int getnextvariable_test1(fwts_framework *fw)
>  	uint16_t *variablename;
>  	EFI_GUID vendorguid;
>  	bool found_name = false, found_guid = false;
> -	int ret;
> +	int ret = FWTS_OK;
>  
>  	for (dataindex = 0; dataindex < datasize; dataindex++)
>  		data[dataindex] = (uint8_t)dataindex;
> 

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



More information about the fwts-devel mailing list