Skip to content

Commit

Permalink
Warning: ignored return value of freopen
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryLundberg authored and jyrkive committed Aug 5, 2017
1 parent 3acd4b8 commit 4a9f64b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/log_windows.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 4a9f64b

Please sign in to comment.