Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented May 6, 2023

Warnings in header files can be a problem for consumers that enable /WX (or -Werror). In this case, using ... & -align produces a warning (C4146) with MSVC. The fix is to use equivalent expression ... & ~(align - 1), which was already used in the same file.

Fixes #12675

Warnings in header files can be a problem for consumers that enable
`/WX` (or `-Werror`).  In this case, using `... & -align` produces a
warning (C4146) with MSVC. The fix is to use equivalent expression
`...  & ~(align - 1)`, which was already used in the same file.
@coryan coryan marked this pull request as ready for review May 6, 2023 21:59
@coryan coryan requested a review from a team as a code owner May 6, 2023 21:59
@coryan coryan requested review from sbenzaquen and removed request for a team May 6, 2023 21:59
@fowles fowles added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label May 7, 2023
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label May 7, 2023
@copybara-service copybara-service bot closed this in 4fcf2c0 May 7, 2023
@coryan coryan deleted the fix-msvc-warnings-in-arena-align branch May 8, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warnings with Protobuf headers and MSVC

2 participants