toys/posix/tar.c:821:7: error: ignoring return value of
  function declared with 'warn_unused_result' attribute
      write(sefd, 0, 0);
      ^~~~~ ~~~~~~~~~~
---
 toys/posix/tar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From e54024a7b25b91338edb44cbe5edfb49ed036c6c Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Tue, 31 Aug 2021 09:15:54 -0700
Subject: [PATCH] tar: fix warn_unused_result error.

  toys/posix/tar.c:821:7: error: ignoring return value of
  function declared with 'warn_unused_result' attribute
      write(sefd, 0, 0);
      ^~~~~ ~~~~~~~~~~
---
 toys/posix/tar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/posix/tar.c b/toys/posix/tar.c
index 42a18832..d38927d0 100644
--- a/toys/posix/tar.c
+++ b/toys/posix/tar.c
@@ -818,7 +818,7 @@ static void unpack_tar(char *first)
 
     if (sefd != -1) {
       // zero length write resets fscreate context to default
-      write(sefd, 0, 0);
+      xwrite(sefd, 0, 0);
       close(sefd);
       sefd = -1;
     }
-- 
2.33.0.259.gc128427fd7-goog

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to