[glib: 2/3] gtestutils: Mark a return value as explicitly ignored




commit 43d984464d9622a06baee30b32b0c9983700167c
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Nov 13 14:12:49 2020 +0000

    gtestutils: Mark a return value as explicitly ignored
    
    We can’t do anything differently based on whether removing a file fails.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Coverity CID: #1354857

 glib/gtestutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 3b03e9831..974785a44 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -1297,8 +1297,8 @@ rm_rf (const gchar *path)
   dir = g_dir_open (path, 0, NULL);
   if (dir == NULL)
     {
-      /* Assume it’s a file. */
-      g_remove (path);
+      /* Assume it’s a file. Ignore failure. */
+      (void) g_remove (path);
       return;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]