From 0b59ca5859ecbe3761faa8a23aeb64a87476e75f Mon Sep 17 00:00:00 2001 From: Ben RUBSON Date: Wed, 4 Oct 2017 07:22:10 +0200 Subject: [PATCH] Correctly check last non-checked return values --- encfs/readpassphrase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/encfs/readpassphrase.cpp b/encfs/readpassphrase.cpp index f9bf0f0..0dabad3 100644 --- a/encfs/readpassphrase.cpp +++ b/encfs/readpassphrase.cpp @@ -147,7 +147,9 @@ restart: *p = '\0'; save_errno = errno; if ((term.c_lflag & ECHO) == 0u) { - (void)write(output, "\n", 1); + if(write(output, "\n", 1) != -1) { + //dummy test to get rid of warn_unused_result compilation warning + } } /* Restore old terminal settings and signals. */