FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: fix warnings in aliased_buffer by kfarnung · Pull Request #19665 · nodejs/node · GitHub

/ node Public

src: fix warnings in aliased_buffer - #19665

Merged
kfarnung merged 0 commit into
nodejs:masterfrom
kfarnung:ab_warnings
Mar 31, 2018
Merged

src: fix warnings in aliased_buffer#19665
kfarnung merged 0 commit into
nodejs:masterfrom
kfarnung:ab_warnings

Conversation

kfarnung commented Mar 28, 2018
edited
Loading

Copy link
Copy Markdown
Contributor
  • Unary minus usages on unsigned type
  • Implicit casts to/from input parameters

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 AliasedBuffer code.

EDIT: These warnings were generated by the VC++ compiler.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

kfarnung self-assigned this Mar 28, 2018
kfarnung requested a review from addaleax March 28, 2018 22:25
nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 28, 2018

Copy link
Copy Markdown
Contributor Author

/cc @mike-kaufman FYI

Copy link
Copy Markdown
Contributor Author

Comment thread src/aliased_buffer.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
Contributor Author

kfarnung closed this Mar 31, 2018
kfarnung merged commit 0d64f33 into nodejs:master Mar 31, 2018

Copy link
Copy Markdown
Contributor Author

Landed in 0d64f33

kfarnung deleted the ab_warnings branch March 31, 2018 06:25
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>
targos mentioned this pull request Apr 4, 2018
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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL