From e00b59c3935d64417af5cda9d77857b280b57b3b Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 18 Mar 2023 11:47:42 +0100 Subject: [PATCH] fix: Properly discard reopened stderr --- main/source/window/linux_window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/source/window/linux_window.cpp b/main/source/window/linux_window.cpp index 492412086..b51c61247 100644 --- a/main/source/window/linux_window.cpp +++ b/main/source/window/linux_window.cpp @@ -9,6 +9,8 @@ #include #include + #include + #include #include #include @@ -27,7 +29,7 @@ namespace hex { // Various libraries sadly directly print to stderr with no way to disable it // We redirect stderr to /dev/null to prevent this - freopen("/dev/null", "w", stderr); + wolv::util::unused(freopen("/dev/null", "w", stderr)); setvbuf(stderr, nullptr, _IONBF, 0); // Redirect stdout to log file if we're not running in a terminal