From: Diego Nieto Cid <[email protected]>

...as no meaningful action can be taken on the result.

==============

    ../../daemons/runttys.c: In function 'main':
    ../../daemons/runttys.c:474:7: warning: ignoring return value of 'write' 
declared with attribute 'warn_unused_result' [-Wunused-result]
      474 |       write (2, "", 0);
          |       ^~~~~~~~~~~~~~~~
---
 daemons/runttys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/daemons/runttys.c b/daemons/runttys.c
index 4e6b1b4f..8aba0116 100644
--- a/daemons/runttys.c
+++ b/daemons/runttys.c
@@ -473,7 +473,8 @@ main (void)
       /* Elicit a SIGLOST now if the console (on our stderr, i.e. fd 2) has
         died.  That way, the next error message emitted will actually make
         it out to the console if it can be made it work at all.  */
-      write (2, "", 0);
+      int err = write (2, "", 0);
+      (void) err;
 
       /* If a SIGTERM or SIGHUP arrived recently, it set a flag
         and broke us out of being blocked in waitpid.  */
-- 
2.51.0


Reply via email to