fix: avoid warnings on MSVC (#12697)
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
Closes #12697
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12697 from coryan:fix-msvc-warnings-in-arena-align 835f3b489a
PiperOrigin-RevId: 530137165
pull/12712/head
parent
f9108c2dd0
commit
4fcf2c0a09
1 changed files with 6 additions and 4 deletions
Loading…
Reference in new issue