[PR #1190] Fix C4334 warnings when building with MSVC #1756

Open
opened 2026-01-29 20:55:39 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/1190

State: closed
Merged: Yes


Currently, brotli emits C4334 warnings about implicit widening of shift results when building Brotli with MSVC for 64-bit targets with at least warning level 3 enabled.

This PR addresses the warnings by adding casts where necessary to widen before shifting (which seemed like the correct solution for all of the cases).

**Original Pull Request:** https://github.com/google/brotli/pull/1190 **State:** closed **Merged:** Yes --- Currently, brotli emits [C4334 warnings](https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4334?view=msvc-170) about implicit widening of shift results when building Brotli with MSVC for 64-bit targets with at least warning level 3 enabled. This PR addresses the warnings by adding casts where necessary to widen before shifting (which seemed like the correct solution for all of the cases).
claunia added the pull-request label 2026-01-29 20:55:39 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1756