]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: remove unnecessary ignore_value usage
authorCollin Funk <collin.funk1@gmail.com>
Thu, 23 Oct 2025 21:40:39 +0000 (14:40 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 23 Oct 2025 21:40:39 +0000 (14:40 -0700)
* src/install.c: Remove ignore-value.h include.
(strip): Don't use ignore_value on posix_spawnattr_destroy since it
isn't declared with the warn_unused_result attribute. Pass the checked
pointer to posix_spawnattr_destroy instead of the variable it points to.

src/install.c

index 26bc16e110f94bc02ebb8c32fbc98869a8a3effc..b01253997fbca58ccdc4234c8eef1038f0b1c325 100644 (file)
@@ -33,7 +33,6 @@
 #include "copy.h"
 #include "filenamecat.h"
 #include "full-read.h"
-#include "ignore-value.h"
 #include "mkancesdirs.h"
 #include "mkdir-p.h"
 #include "modechange.h"
@@ -501,7 +500,7 @@ strip (char const *name)
       if (posix_spawnattr_setflags (&attr, POSIX_SPAWN_USEVFORK) == 0)
         attrp = &attr;
       else
-        ignore_value (posix_spawnattr_destroy (&attr));
+        posix_spawnattr_destroy (&attr);
     }
 
   /* Construct the arguments to 'strip'.  */
@@ -539,7 +538,7 @@ strip (char const *name)
 
   free (concat_name);
   if (attrp)
-    ignore_value (posix_spawnattr_destroy (&attr));
+    posix_spawnattr_destroy (attrp);
 
   return ok;
 }