From 165d168ee51943dc9a91c5d54770a08417f0b039 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 29 Nov 2018 09:36:08 -0800 Subject: [PATCH] fix: ignore unused freopen result (#15884) --- atom/app/atom_main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/app/atom_main.cc b/atom/app/atom_main.cc index a739c092682..241f0c2679c 100644 --- a/atom/app/atom_main.cc +++ b/atom/app/atom_main.cc @@ -69,11 +69,11 @@ void FixStdioStreams() { // For details see https://github.com/libuv/libuv/issues/2062 struct stat st; if (fstat(STDIN_FILENO, &st) < 0 && errno == EBADF) - freopen("/dev/null", "r", stdin); + ignore_result(freopen("/dev/null", "r", stdin)); if (fstat(STDOUT_FILENO, &st) < 0 && errno == EBADF) - freopen("/dev/null", "w", stdout); + ignore_result(freopen("/dev/null", "w", stdout)); if (fstat(STDERR_FILENO, &st) < 0 && errno == EBADF) - freopen("/dev/null", "w", stderr); + ignore_result(freopen("/dev/null", "w", stderr)); } #endif