Skip to content

src: replace unreachable code with static_assert - #46250

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:src-crypto-secretkeygentraits-staticassert
Jan 21, 2023
Merged

src: replace unreachable code with static_assert#46250
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:src-crypto-secretkeygentraits-staticassert

Conversation

@tniessen

Copy link
Copy Markdown
Member

This function divides an unsigned 32-bit integer by 8, effectively right-shifting it by three bits, so the result must be less than INT_MAX.

Refs: #46209

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Jan 18, 2023
This function divides an unsigned 32-bit integer by 8, effectively
right-shifting it by three bits, so the result must be less than
INT_MAX.
Refs: nodejs#46209
@tniessen
tniessenforce-pushed the src-crypto-secretkeygentraits-staticassert branch from 632c5b4 to 2eb372dCompareJanuary 18, 2023 12:37
@addaleaxaddaleax added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 18, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 18, 2023
@nodejs-github-bot

This comment was marked as outdated.

@tniessentniessen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 18, 2023
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@lpincalpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 21, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 21, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 5ccf4ef into nodejs:mainJan 21, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 5ccf4ef

ruyadorno pushed a commit that referenced this pull request Feb 1, 2023
This function divides an unsigned 32-bit integer by 8, effectively
right-shifting it by three bits, so the result must be less than
INT_MAX.
Refs: #46209
PR-URL: #46250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@ruyadornoruyadorno mentioned this pull request Feb 1, 2023
juanarbol pushed a commit that referenced this pull request Mar 3, 2023
This function divides an unsigned 32-bit integer by 8, effectively
right-shifting it by three bits, so the result must be less than
INT_MAX.
Refs: #46209
PR-URL: #46250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@juanarboljuanarbol mentioned this pull request Mar 3, 2023
juanarbol pushed a commit that referenced this pull request Mar 5, 2023
This function divides an unsigned 32-bit integer by 8, effectively
right-shifting it by three bits, so the result must be less than
INT_MAX.
Refs: #46209
PR-URL: #46250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.cryptoIssues and PRs related to the crypto subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@tniessen@nodejs-github-bot@bnoordhuis@addaleax@lpinca