src: initialize pid variable before goto by nornagon · Pull Request #22961 · nodejs/node
This fixes an error when compiling with clang-cl on Windows:
```
src/node.cc(2437,5): error: jump from this goto statement to its label is a Microsoft extension [-Werror,-Wmicrosoft-goto]
goto out;
^
src/node.cc(2441,9): note: jump bypasses variable initialization
DWORD pid = args[0].As<Integer>()->Value();
^
```
added
the
c++
label
Sep 19, 2018
Issues and PRs related to the Windows platform.
Issues and PRs related to general changes in the lib or src directory.
PRs that do not need to wait for 72 hours to land.
PRs that have at least one approval, no pending requests for changes, and a CI started.
labels
Sep 20, 2018addaleax pushed a commit that referenced this pull request
Sep 20, 2018This fixes an error when compiling with clang-cl on Windows:
```
src/node.cc(2437,5): error: jump from this goto statement to its label is a Microsoft extension [-Werror,-Wmicrosoft-goto]
goto out;
^
src/node.cc(2441,9): note: jump bypasses variable initialization
DWORD pid = args[0].As<Integer>()->Value();
^
```
PR-URL: #22961
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
targos pushed a commit that referenced this pull request
Sep 21, 2018This fixes an error when compiling with clang-cl on Windows:
```
src/node.cc(2437,5): error: jump from this goto statement to its label is a Microsoft extension [-Werror,-Wmicrosoft-goto]
goto out;
^
src/node.cc(2441,9): note: jump bypasses variable initialization
DWORD pid = args[0].As<Integer>()->Value();
^
```
PR-URL: #22961
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This was referenced
Oct 10, 2018This was referenced
Oct 11, 2018This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters