[PATCH] uefirtvariable: fix the uncheck return value warnings

Ivan Hu ivan.hu at canonical.com
Thu Dec 4 02:59:15 UTC 2014


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)
-- 
1.7.9.5




More information about the fwts-devel mailing list