-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: remove '
printf modifier
#13447
Conversation
src/env-inl.h
Outdated
@@ -146,7 +146,7 @@ inline bool Environment::AsyncHooks::pop_ids(double async_id) { | |||
if (uid_fields_[kCurrentAsyncId] != async_id) { | |||
fprintf(stderr, | |||
"Error: async hook stack has become corrupted (" | |||
"actual: %'.f, expected: %'.f)\n", | |||
"actual: %f, expected: %f)\n", |
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.
The .
should not be removed. Otherwise we get ${id}.000000
.
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.
Ack
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.
P.S. why is it a double?
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.
why is it a double?
So that it isn’t limited by 2^32 in its range, but still representable in JS. If you prefer, casting to uint64_t
should be safe here.
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.
If you prefer, casting to uint64_t should be safe here.
I'll read a bit about fprintf
on windows and think about it.
IMHO for this PR %.f
works
Worth adding a
|
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
It is not supported on Windows so it emits: warning C4476: 'fprintf' : unknown type field character ''' in format specifier warning C4474: 'fprintf' : too many arguments passed for format string PR-URL: nodejs#13447 Fixes: nodejs#13463 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Andreas Madsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
landed in f06c05c |
It is not supported on Windows so it emits: warning C4476: 'fprintf' : unknown type field character ''' in format specifier warning C4474: 'fprintf' : too many arguments passed for format string PR-URL: #13447 Fixes: #13463 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Andreas Madsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
It is not supported on Windows so it emits:
Fixes: #13463
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src