-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
dtrace: resolve conversion warning (Windows) #10143
Conversation
->ToInteger(env->isolate())->Value(); | ||
*valp = \ | ||
static_cast<int32_t>(obj->Get(OneByteString(env->isolate(), #member)) \ | ||
->ToInteger(env->isolate())->Value()); |
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.
obj->Get(...)->Int32Value()
?
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.
+5
75636a5
to
9087785
Compare
@bnoordhuis I did redo the fix according to your suggestion, thanks for the feedback! |
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.
LGTM but can you spruce up the commit log a little? I.e., more than just "(Windows)"?
Yes the log could have been better. I wanted to put the "(Windows)" part on the subject line but then I couldn't fit a nice, complete commit subject into the standard 50 character length. My idea is to replace "(Windows)" with "(Windows build)". Short, sweet, and to the point. @bnoordhuis please reply if this is still not quite good enough. Otherwise I will do this tomorrow morning. |
Take a look at other commits for inspiration. It should consist of a short status line and a few more lines describing the what and why. I usually include the compiler message verbatim when it's a fix for a compiler warning. |
a6de333
to
d463558
Compare
I just amended the commit with the following message:
|
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data
d463558
to
5a8126c
Compare
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 099762d |
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Should this be backported? |
ping |
ping @bnoordhuis I guess |
Could be back-ported. |
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Resolve build warnings on Windows with the following pattern: warning C4244: '=': conversion from 'int64_t' to 'int32_t', possible loss of data PR-URL: #10143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j8 test
(UNIX [macOS]; Linux i386 & amd64) andvcbuild test nosign
(.\vcbuild.bat nosign
then.\vcbuild.bat test nosign nobuild
as Administrator on Windows) PASS OKAdditional item
Affected core subsystem(s)
dtrace
Description of change
static_cast<int32_t> in SLURP_INT macro - resolve conversion warning on Windows
NOTE: This was originally a part of PR #10139 (build, warning, header, and include fixes).
ADDITIONAL NOTE: This and some warnings related to PR #10139 may indicate potential data loss scenarios. For future examination.