Pointed out by the compiler combined with glibc's use of
__attribute__((__warn_unused_result__)) on write().
---
 toys/lsb/seq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From 7a99d68806991b034fc17c0b8a577df320240128 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Tue, 15 Dec 2020 13:35:52 -0800
Subject: [PATCH] seq: always xwrite.

Pointed out by the compiler combined with glibc's use of
__attribute__((__warn_unused_result__)) on write().
---
 toys/lsb/seq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/lsb/seq.c b/toys/lsb/seq.c
index 45c82d51..83abc472 100644
--- a/toys/lsb/seq.c
+++ b/toys/lsb/seq.c
@@ -114,7 +114,7 @@ void seq_main(void)
       ss = flush_toybuf(itoa(ss, ii));
     else if (inc<0) for (; ii>=len; ii += inc)
       ss = flush_toybuf(itoa(ss, ii));
-    if (ss != toybuf) write(1, toybuf, ss-toybuf);
+    if (ss != toybuf) xwrite(1, toybuf, ss-toybuf);
 
     return;
   }
-- 
2.29.2.684.gfbc64c5ab5-goog

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

Reply via email to