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/12702/head
parent
fe1277f9a8
commit
b880933ed3
1 changed files with 6 additions and 4 deletions
Loading…
Reference in new issue