[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: ACK: [PATCH] uefirtvariable: indicate that return from setvariable_insertvariable is ignored
From: ivanhu <ivan.hu () canonical ! com>
Date: 2020-01-14 4:20:45
Message-ID: e5d9b2f3-75a8-5197-625b-502161c8ced2 () canonical ! com
[Download RAW message or body]
On 1/13/20 7:43 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Voidify the return from the call to setvariable_insertvariable to indicate that
> we are intentionally ignoreing the return from the function call.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> src/uefi/uefirtvariable/uefirtvariable.c | 26 ++++++++++++------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index a1bf9cc8..fbb877a6 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -1177,10 +1177,10 @@ static int setvariable_test1(
> return FWTS_OK;
>
> err_restore_env:
> - setvariable_insertvariable(fw, attributes, 0, varname,
> + (void)setvariable_insertvariable(fw, attributes, 0, varname,
> >estguid1, datadiff_g1);
> err_restore_env1:
> - setvariable_insertvariable(fw, attributes, 0, varname,
> + (void)setvariable_insertvariable(fw, attributes, 0, varname,
> >estguid2, datadiff_g2);
>
> return ret;
> @@ -1242,17 +1242,17 @@ static int setvariable_test2(fwts_framework *fw, uint16_t *varname)
> return FWTS_OK;
>
> err_restore_env1:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> varname, >estguid1, datadiff1);
> return ret;
>
> err_restore_env2:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> varname, >estguid1, datadiff2);
> return ret;
>
> err_restore_env3:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> varname, >estguid1, datadiff3);
> return ret;
> }
> @@ -1311,13 +1311,13 @@ static int setvariable_test3(fwts_framework *fw)
> return FWTS_OK;
>
> err_restore_env:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> variablenametest, >estguid1, datadiff1);
> err_restore_env1:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> variablenametest3, >estguid1, datadiff3);
> err_restore_env2:
> - setvariable_insertvariable(fw, attributes, 0,
> + (void)setvariable_insertvariable(fw, attributes, 0,
> variablenametest2, >estguid1, datadiff2);
>
> return ret;
> @@ -1388,7 +1388,7 @@ static int setvariable_test6(fwts_framework *fw)
> /* successfully set variable with invalid attributes, test fail */
> fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIRuntimeSetVariable",
> "Successfully set variable with invalid attribute, expected fail.");
> - setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> + (void)setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> return FWTS_ERROR;
> }
>
> @@ -1400,7 +1400,7 @@ static int setvariable_test6(fwts_framework *fw)
> PRIu32 " after ExitBootServices() is "
> "performed, test failed.",
> attributesarray[index]);
> - setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> + (void)setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> return FWTS_ERROR;
> }
> }
> @@ -1421,7 +1421,7 @@ static int setvariable_test7(fwts_framework *fw)
> fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIRuntimeSetVariable",
> "Successfully set variable with both authenticated (EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS "
> "EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) attributes are set, expected fail.");
> - setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> + (void)setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> return FWTS_ERROR;
> }
>
> @@ -1432,7 +1432,7 @@ static int setvariable_test7(fwts_framework *fw)
> "authenticated (EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS "
> "EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) "
> "attributes are set %" PRIu32 " , test failed.", attr);
> - setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> + (void)setvariable_insertvariable(fw, 0, datasize, variablenametest, >estguid1, datadiff);
> return FWTS_ERROR;
> }
> return FWTS_OK;
> @@ -1773,7 +1773,7 @@ static int uefirtvariable_test6(fwts_framework *fw)
> variablenametest, >estguid1, datadiff);
> if (ret != FWTS_OK) {
> if (i > 0)
> - setvariable_insertvariable(fw, attributes, 0, variablenametest,
> + (void)setvariable_insertvariable(fw, attributes, 0, variablenametest,
> >estguid1, datadiff);
> return ret;
> }
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic