ACK: [PATCH] uefirtvariable: fix the uncheck return value warnings

Alex Hung alex.hung at canonical.com
Thu Dec 4 06:28:50 UTC 2014


On 12/04/2014 10:59 AM, Ivan Hu wrote:
> Coverity Scan complains the unchecked return value of the ioctl() calls in
> uefirtvariable_env_cleanup(). These return value of the calls don't need to be
> cared.
> 
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index a19f835..94caf0d 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -74,17 +74,17 @@ static void uefirtvariable_env_cleanup(void)
>  	setvariable.DataSize = 0;
>  	setvariable.Data = &data;
>  	setvariable.status = &status;
> -	ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
> +	(void)ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
>  
>  	setvariable.VariableName = variablenametest2;
> -	ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
> +	(void)ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
>  
>  	setvariable.VariableName = variablenametest3;
> -	ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
> +	(void)ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
>  
>  	setvariable.VariableName = variablenametest;
>  	setvariable.VendorGuid = &gtestguid2;
> -	ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
> +	(void)ioctl(fd, EFI_RUNTIME_SET_VARIABLE, &setvariable);
>  }
>  
>  static int uefirtvariable_init(fwts_framework *fw)
> 

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



More information about the fwts-devel mailing list