From 4a9f64bd53f548da27be2625b1f073ac9740493f Mon Sep 17 00:00:00 2001 From: lundberg Date: Fri, 4 Aug 2017 12:47:40 -0500 Subject: [PATCH] Warning: ignored return value of freopen --- src/log_windows.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/log_windows.cpp b/src/log_windows.cpp index 113197cfb0ef..8a6fef8f4c39 100644 --- a/src/log_windows.cpp +++ b/src/log_windows.cpp @@ -430,15 +430,15 @@ void log_file_manager::enable_native_console_output() DBG_LS << "stderr to console\n"; fflush(stderr); std::cerr.flush(); - freopen("CONOUT$", "wb", stderr); + assert(freopen("CONOUT$", "wb", stderr) == stderr); DBG_LS << "stdout to console\n"; fflush(stdout); std::cout.flush(); - freopen("CONOUT$", "wb", stdout); + assert(freopen("CONOUT$", "wb", stdout) == stdout); DBG_LS << "stdin from console\n"; - freopen("CONIN$", "rb", stdin); + assert(freopen("CONIN$", "rb", stdin) == stdin); // At this point the log file has been closed and it's no longer our // responsibility to clean up anything; Windows will figure out what to do