Skip to content
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

quic: fix clang warning #33963

Closed
wants to merge 1 commit into from
Closed

Conversation

gengjiawen
Copy link
Member

Fix #33959

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels Jun 19, 2020
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Maybe leave a comment here stating that this is supposed to be NGTCP2_ALPN_H3 + 1 but can’t be due to a compiler warning?

Copy link
Member

@lundibundi lundibundi left a comment

Choose a reason for hiding this comment

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

Or we can just add ignore to the code as it was before as it is IMO clearer.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jun 19, 2020

@gengjiawen
Copy link
Member Author

Maybe leave a comment here stating that this is supposed to be NGTCP2_ALPN_H3 + 1 but can’t be due to a compiler warning?

Updated.

Or we can just add ignore to the code as it was before as it is IMO clearer.

In most cases, clang warning is very helpful. This is the only clang warning in our code base (icu has one in deps to be precise).

And this is the first time I know string plus int in C is pointer arithmetic(especially for us who write too many js and java).

@jasnell jasnell added the experimental Issues and PRs related to experimental features. label Jun 19, 2020
@lundibundi
Copy link
Member

lundibundi commented Jun 19, 2020

In most cases, clang warning is very helpful. This is the only clang warning in our code base (icu has one in deps to be precise).
And this is the first time I know string plus int in C is pointer arithmetic(especially for us who write too many js and java).

Yeah, I meant to disable\ignore it for this line specifically while adding a comment why it is disabled.

@nodejs-github-bot
Copy link
Collaborator

jasnell pushed a commit that referenced this pull request Jun 22, 2020
PR-URL: #33963
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@jasnell
Copy link
Member

jasnell commented Jun 22, 2020

Landed in 8ef86a9

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++. experimental Issues and PRs related to experimental features. quic Issues and PRs related to the QUIC implementation / HTTP/3.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problematic string handle
8 participants