src: fix warnings in aliased_buffer#19665
Merged
kfarnung merged 0 commit intonodejs:masterfrom Mar 31, 2018
Merged
Conversation
Contributor
Author
|
/cc @mike-kaufman FYI |
Contributor
Author
2 tasks
addaleax
approved these changes
Mar 28, 2018
src/aliased_buffer.h
Outdated
Member
There was a problem hiding this comment.
Just curious, was this causing real issues? Unary minus on unsigned values should not really be an issue afaik, although I agree that being explicit is probably a good idea?
Contributor
Author
There was a problem hiding this comment.
No functional issue, I was just seeing a warning in VC++ and looking at the code it's not clear what the behavior is when values are unsigned. Looking around it appears to be speced behavior, but still didn't feel intuitive.
mike-kaufman
approved these changes
Mar 28, 2018
danbev
approved these changes
Mar 29, 2018
XadillaX
approved these changes
Mar 29, 2018
jasnell
approved these changes
Mar 29, 2018
Contributor
Author
Contributor
Author
TimothyGu
approved these changes
Mar 29, 2018
Contributor
Author
|
One more CI: https://ci.nodejs.org/job/node-test-pull-request/13951/ If there are no objections I plan to land this today. |
Contributor
Author
Contributor
Author
|
Landed in 0d64f33 |
targos
pushed a commit
that referenced
this pull request
Apr 2, 2018
* Unary minus usages on unsigned type * Implicit casts to/from input parameters PR-URL: #19665 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Merged
This 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I removed the template parameters from the operator overloads to push the burden of casting out of aliased buffer. It now expects the correct type to be passed to it and will generate warnings at the site rather than in the
AliasedBuffercode.EDIT: These warnings were generated by the VC++ compiler.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes