Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2fe9886

Browse filesBrowse files
richardlauaddaleax
authored andcommitted
report: fix build warning in node_report.cc
Fixes `maybe-uninitialized` build warning in `src/node_report.cc`. PR-URL: #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>
1 parent 7612574 commit 2fe9886
Copy full SHA for 2fe9886

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Open diff view settings
Collapse file

‎src/node_report.cc‎

Copy file name to clipboardExpand all lines: src/node_report.cc
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,14 @@ std::string TriggerNodeReport(Isolate* isolate,
172172
std::cerr << " (errno: " << errno << ")" << std::endl;
173173
return "";
174174
}
175+
outstream = &outfile;
175176

176177
std::cerr << std::endl
177178
<< "Writing Node.js report to file: " << filename << std::endl;
178179
}
179180

180-
// Pass our stream about by reference, not by copying it.
181-
std::ostream& out = outfile.is_open() ? outfile : *outstream;
182-
183-
WriteNodeReport(
184-
isolate, env, message, location, filename, out, stackstr, &tm_struct);
181+
WriteNodeReport(isolate, env, message, location, filename, *outstream,
182+
stackstr, &tm_struct);
185183

186184
// Do not close stdout/stderr, only close files we opened.
187185
if (outfile.is_open()) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.