-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: assignment to valid type #32879
Conversation
@yashLadha This PR moves the type conversions from the place where we extract the native value from the passed JS value to the place where we pass the native value to libuv, but the conversions are still there and they are still the same. I guess for |
@addaleax My argument for this change is to have a consistent type for the assignment because we are casting the values as
For this what should be cases when it can be negative, as port is always a positive property |
@yashLadha I’m not arguing against this, to be clear :) I’m just pointing out that this performs the same type conversions and has the same behavior as it did before. |
@addaleax Got it, but when browsing through the code, the cast and the type of lvalue seemed inconsistent that's why i created this PR. 😄 I know it won't make any difference because both can store the value but enforcing it I thought would be a good idea. |
@addaleax Is something else to be done? |
@yashLadha I think somebody needs to approve this PR. If you want my personal opinion, I think I’d be -0.005 on this, given that it makes the cast a bit less visible (you’d have to look up the definitions of the libuv functions to know that it is happening, instead of just “seeing” it like you did), and I would be +0.005 on a PR that adds |
@addaleax that is a very helpful review. Checking 👍 |
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting.
7a7a5f0
to
9489beb
Compare
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
landed in 658cae0 |
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are doing conversion of arguments to
uint32_t
but the lvalue typeis not consistent with the casting. Also, the lvalue type differs at
different occurrences. Ideally, such changes should be picked up by the linter, can we move forward in this direction 🤔 .
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes