-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: replace c-style cast #26888
src: replace c-style cast #26888
Conversation
8f16c4b
to
fc3a773
Compare
This is failing on Windows:
|
fc3a773
to
8895635
Compare
I make the change to originally suggested by Visual Studio, Can you trigger thew windows build ? thanks. |
src/api/exceptions.cc
Outdated
if (must_free) | ||
LocalFree((HLOCAL)msg); | ||
if (must_free) { | ||
LocalFree(HLOCAL(msg)); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave this with
LocalFree(HLOCAL(msg)); | |
LocalFree((HLOCAL)msg); // NOLINT(google-readability-casting) |
because there is a bug in the API and what we really need here is:
LocalFree(const_cast(char*>(msg));
but that's just as bad for tidy
.
8895635
to
e153a85
Compare
CI: https://ci.nodejs.org/job/node-test-pull-request/22102/ [refack]
Because what we really need is a |
FTR: This probably need using |
Revert to the original one and add |
Thinking about this again, let's just use the |
PR-URL: nodejs#26888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #26888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #26888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
PR-URL: #26888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
PR-URL: #26888 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes