mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
report: fix build warning in node_report.cc
Fixes `maybe-uninitialized` build warning in `src/node_report.cc`. PR-URL: https://github.com/nodejs/node/pull/26265 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
1 parent
7612574e42
commit
2fe9886f6f
1 file changed
+3
-5
+3
-5
@@ -172,16 +172,14 @@ std::string TriggerNodeReport(Isolate* isolate,
|
||||
std::cerr << " (errno: " << errno << ")" << std::endl;
|
||||
return "";
|
||||
}
|
||||
outstream = &outfile;
|
||||
|
||||
std::cerr << std::endl
|
||||
<< "Writing Node.js report to file: " << filename << std::endl;
|
||||
}
|
||||
|
||||
// Pass our stream about by reference, not by copying it.
|
||||
std::ostream& out = outfile.is_open() ? outfile : *outstream;
|
||||
|
||||
WriteNodeReport(
|
||||
isolate, env, message, location, filename, out, stackstr, &tm_struct);
|
||||
WriteNodeReport(isolate, env, message, location, filename, *outstream,
|
||||
stackstr, &tm_struct);
|
||||
|
||||
// Do not close stdout/stderr, only close files we opened.
|
||||
if (outfile.is_open()) {
|
||||
|
||||
Reference in new issue
Block a user